Adding Nav Items to Buddy Press Adminbar

HI,

I’ve gone through the forum and thought I found a solution to this but it’s not working. I added the following code to the end of my functions.php file for the Buddy Corporate theme:

function add_more_nav() { ?>
<li><a href="http://112daychallenge.net/submit-blog-post/">Submit post</a></li>
<?php
}
add_action('bp_nav_items','add_more_nav');

Did I miss something out?

  • Fondeli
    • The Bug Hunter

    Hi,

    I think that you have the ‘?>’ in the wrong place. I have this same code, but I have added it in as a mu-plugin.

    <?php
    //add the action hook
    add_action("bp_nav_items","extra_nav_links");

    //insert the links now
    function extra_nav_links()
    {
    ?>

    <li><a href="http://fondelifair.com/guilds">Guilds</a></li>
    <li>
    <?php
    }
    ?>

    It seems your code is closing the php statement, when there is no ‘<?php’ and at the end you have the ‘<?php’ but no closing ‘?>’.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.