Skip to:
Content
Pages
Categories
Search
Top
Bottom

How do I add links to the top navbar?

  • @blackcat09

    Member

    Say I wanted to add a forum link to the top navbar of the home theme (or even the members theme), how would I do this?

    Seems like it would be easy? Do I edit the template or is there a place on the backend to input this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • @djpaul

    Keymaster

    You can hook into it with the bp_nav_items action (see bp-core-templatetags.php line 535), though that function is marked as deprecated and that “you should put these navigation items in your template header.php for easy editing.” So, for now, take your pick.

    @blackcat09

    Member

    ahhh – looks like it will be a template edit for me! Thanks Paul

    @pcwriter

    Participant

    Hi all!

    I’d also like to add a button with an external link. I can see where in the header.php file I need to insert it but have never coded php before. Could someone show me the exact line of code I would need to insert to create a button that links to an external url?

    Thanks!

    @takeo

    Participant

    What is the thinking behind deprecating the hook and recommending a template edit? I would think that if someone is using the default theme and only wants to add a single link to the header… it might be better to do is using the hook and the functions.php file… rather than have to duplicate an entire template in the child? Just wondering.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How do I add links to the top navbar?’ is closed to new replies.
Skip to toolbar