Jump to content


Photo
- - - - -

Custom text or html instead of image on Fixed Nav Bar

fixed nav bar

  • Please log in to reply
9 replies to this topic

#1 williamweber

williamweber

    Advanced Member

  • Members

  • 36 posts
  • Country: Country Flag

Posted 19 March 2014 - 11:13 PM

I'm wondering if it's possible to insert some text instead of a logo in the fixed nav var. I have the menu setup the way I want but instead of my site title or an image I would like to put some social links sort of like the ones used in Branding tutorial in the Pagelines docs section. http://docs.pageline...a-branding-area

 

It's this possible?

 

Thanks.



#2 James B

James B

    Advocate

  • Moderators
  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 19 March 2014 - 11:44 PM

Hi there,

 

This is possible but you'd need to use a hook to insert the code into the fixed nav, unfortunately you wouldn't be able to do it via the drag and drop. The best way to do this would be to set up html for the icons in the way you want inside a textbox or similar so you get the layout and the css exactly how you want them.

 

Then activate the actionmap option inside the Pro Tools plugin so you can see which hook you'd need to use to position the code in the best place inside the fixed nav. Make a note of that hook and use the instruction here to add your html into that hook - http://docs.pageline.../advanced/hooks



#3 williamweber

williamweber

    Advanced Member

  • Members

  • 36 posts
  • Country: Country Flag

Posted 20 March 2014 - 03:28 AM

Thanks for the response. I'm getting closer to a solution but unfortunately the ActionMap is pretty incomplete. It's not showing a lot of possible hooks that are present in the pagelines hooks documentation: http://www.pagelines...libs/hooks.html

 

Notable among the missing hooks is the "navbar_brand" hook that's actually part of the very helpful sample code provided on the link you provided. 

 

The other disappointing thing I found is that the Hooker plugin also doesn't show a lot of these possible hooks so I'm learning all about the functions.php file now.

 

I found the pagelines-customize-plugin documentation and have installed that plugin: http://docs.pageline...ustomize-plugin

 

After adding the sample pretty much verbatim from the advanced hooks example I was able to replace the fixed nav title with my new code but the formatting is all wonky. I think that's just going to be a matter of editing the CSS to get things to fall in place.

 

Thank you for the pointing me in the right direction. Even though some of the tools don't seem to be working 100% the way I would have expected I'm at least a lot closer than I was.

 

-Will



#4 James B

James B

    Advocate

  • Moderators
  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 20 March 2014 - 09:10 AM

Hi there, glad you've managed to make progress.

 

Action map will only show the hooks loaded on the page, not all hooks are loaded on every page it depends which sections are active etc. Hooker will only include DMS related hooks, not all the additional hooks provided by WP.

 

The hook once in place will only place the code into the required area, so you're correct that you'll need to use css to get the styling and alignment correct in the layout to get it looking the way you need it in the layout.

 

Let us know how you get on.



#5 williamweber

williamweber

    Advanced Member

  • Members

  • 36 posts
  • Country: Country Flag

Posted 20 March 2014 - 03:10 PM

Action map will only show the hooks loaded on the page, not all hooks are loaded on every page it depends which sections are active etc. Hooker will only include DMS related hooks, not all the additional hooks provided by WP.

 

So this part is where I was confused. I would have expected to see the navbar_brand hook displayed on every page because it's in the fixed nav bar so is displayed on every page. And I also was hoping to see it in Hooker because I thought it was a DMS specific hook. But neither was true. However after adding the example code to the functions.php in the pagelines_customization_plugin folder things started to fall into place.

 

I'm still having a little trouble with placement since it doesn't seem like my replacement HTML wants to align all the way to the left of the fixed nav bar section, and I get some weird responsive behavior when I shrink the window down to mobile size but hopefully I can resolve those in time.

 

The site is: http://simplify.bi It's all test content at the moment because I'm trying to get all the layout things worked out, but it's coming along.

 

Thanks again for the speedy responses.



#6 James B

James B

    Advocate

  • Moderators
  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 21 March 2014 - 09:45 AM

Hi there, navbar_brand is a wp filter not an action hook which is probably why it's not included. Hooker and actionmap will only show action hooks on the page, not filters. I will check with the core team to confirm that for you.

 

http://screencast.com/t/6y5WFSYkW



#7 williamweber

williamweber

    Advanced Member

  • Members

  • 36 posts
  • Country: Country Flag

Posted 21 March 2014 - 02:14 PM

Thanks. I'm still learning the different between filters and actions and how to determine which hook is which. I think I thought a hook was just a hook and then you could apply a filter or an action to that hook. Clearly I misunderstood how it all works. Thanks for the assistance.



#8 James B

James B

    Advocate

  • Moderators
  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 22 March 2014 - 12:00 AM

Hi there, you're welcome.

 

If it helps this is the hook article I usually reference as I found it the easiest to understand - http://wpcandy.com/t...ordpress-hooks/

 

Action hooks let you add content, filters let you amend/manipulate whats already there.


  • GetMeWebDesign likes this

#9 joshkent

joshkent

    Member

  • Members

  • 18 posts
  • Country: Country Flag

Posted 13 May 2014 - 05:19 PM

Similar problem to above. Except I am trying to make changes to the link for the logo in the "Navi" section. I can't find any filters for that section or when I use the child theme with the altered "navi" section included it does not override the section.  

 

Any suggestions?

 

Josh



#10 Danny

Danny

    Is Awesome!

  • Moderators
  • 15047 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 14 May 2014 - 10:56 AM

Hi Josh,

 

I have just added a the Navi section to my child themes sections folder and made some basic changes, these changes appeared. What child theme are you using and what changes did you make and to which file?







Also tagged with one or more of these keywords: fixed nav bar