Jump to content
Sign in to follow this  
gayatriom

How Can I add PHP Code to my main navigation menu?

Recommended Posts

gayatriom    0
gayatriom

Hey. So I am using buddypress and I have the php code to add a 'Your profile' link. But I am trying to add it to the main navigation menu. Is that possible?

Share this post


Link to post
Share on other sites
gayatriom    0
gayatriom

After doing some research i discovered that i must add Something like the below code to my bp-custom.php folder. However, since I am using a custom wordpress menu,the 'bp_nav_items' part of the below code would be irrelevant. Do you know what the main nav is called in pagelines? <?php add_action("bp_nav_items","show_user_link"); function show_user_link(){ if(!is_user_logged_in()) return; ?> <li<?php if ( bp_is_home()) : ?> class="selected"<?php endif; ?>> ">MY Profile <?php } ?>

Share this post


Link to post
Share on other sites
timlinson    3
timlinson

If you're using PlatformPro, go to Template Setup and click the "Advanced Setup" link of the "Navigation" block. You'll see some primary nav related hook names that you could try.

Share this post


Link to post
Share on other sites
gayatriom    0
gayatriom

hmm ok. cool. thanks. Ya i'm using platform pro.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×