This topic has 4 replies, 3 voices, and was last updated 10 years by Jonbie.

  • Author
  • #13091
     Jonbie
    Participant

    I have tried everything from plugins to custom code and i just cant make it work. I am looking to get a “http:///mywebsite.com/forums” (called View Forums) menu option into my wp-admin-bar dropdown menu under the forums tab dropdown menu.

    my site is nearly ready to go and this is the one thing i am struggling to finish,

    Thanks for the help!

    #13113
     Kieran
    Participant

    This plugin https://wordpress.org/plugins/custom-admin-bar/ “Custom Admin Bar” will do what you have described

    #13161
     Jonbie
    Participant

    thanks for getting back to me Kieran. i have that installed a the moment as i wanted to remove the them options links etc (so as not to allow users access to the backend of the website)

    Unfortunately it only adds a link to the bar and not to the forums sub menu. In the dropdown menu there is a tab labeled “forums” when you hover over this it expands and gives you 4 options (none of which are to view the forum page which i found very strange) These menus were there by default after i installed bb press.

    i am looking to add a view forums tab to the forums sub menu.

    Is this possible?

    #13257
     Abe
    Keymaster

    Hi, This function added to kleo-child/functions.php and having the kleo child theme active will add a submenu to that forums menu:

    COPY CODE
    
    add_filter('bp_forums_admin_nav','kleo_my_forums_menu');
    function kleo_my_forums_menu($wp_admin_nav) {
    	$wp_admin_nav[] = array(
    		'parent' => 'my-account-forums',
    		'id'     => 'my-account-forums-root',
    		'title'  => __( 'Forum', 'bbpress' ),
    		'href'   => '/forums'
    	);
    	return $wp_admin_nav;
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #13424
     Jonbie
    Participant

    Abe, thank you so much for that. works perfectly.

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘adding menu link to ap-admin-bar’ is closed to new replies.

Log in with your credentials

Forgot your details?