Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to add to the "My Account" section of the nav?

Viewing 5 replies - 1 through 5 (of 5 total)
  • @r-a-y

    Keymaster

    Unfortunately, there’s no hook in the “My Account” menu to add custom items so you’ll basically need to duplicate the bp_adminbar_account_menu() and add your changes, then remove the bp_adminbar_account_menu() function and add your custom function.

    The following guide tells you how to do this:

    https://codex.buddypress.org/how-to-guides/modifying-the-buddypress-admin-bar/

    @putnum01

    Participant

    Thanks Ray I did read that but I did not seem to understand it. I just want to put a link in there that Say write post and it links to

    http://sitename.com/wp-admin/post-new.php

    Any ideas?

    @putnum01

    Participant

    Or I could have a link outside the bar and next to the Home,Members,Groups ETC but I only want logged in users to be able to see the link. Like this:

    Home, Write A Post, Members, Groups

    And when users are not logged in they don’t see Write A Post.

    I have included this code in the header.php and the link is there but how do I change it to only allow logged in users to see it?

    <li<?php if ( bp_is_front_page() ) : ?>class=”selected”<?php endif; ?>>

    “><?php _e( ‘Write A Post’, ‘buddypress’ ) ?>

    @r-a-y

    Keymaster

    Use:

    <php if(is_user_logged_in()) : ?>YOUR LINK<?php endif; ?>

    @putnum01

    Participant

    ok that worked thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to add to the "My Account" section of the nav?’ is closed to new replies.
Skip to toolbar