Skip to:

Adding page to top navigation menu

  • Tom


    (Next to “Members”, “Blogs”, etc).

    I’ve added my page via header.php copying code from one of the other links:

    <li<?php if ( bp_is_page( BP_HOME_BLOG_SLUG ) ) : ?> class="selected"<?php endif; ?>><a href="<?php echo get_option('home') ?>/<?php echo BP_HOME_BLOG_SLUG ?>" title="<?php _e( 'Blog', 'buddypress' ) ?>"><?php _e( 'News', 'buddypress' ) ?></a></li>

    Here is what I added:

    <li<?php if ( bp_is_page( contact-us ) ) : ?> class="selected"<?php endif; ?>><a href="" title="<?php _e( 'Contact us', 'buddypress' ) ?>"><?php _e( 'Contact us', 'buddypress' ) ?></a></li>

    But no matter what page I am on, the “Contact us” page is highlighted. How do I change the “is is page” so that it’s only marked as selected if actually on the “contact us” page?

    As you can see… Ive changed the slug in my code, but I’ve probably done it wrong.

    Anyone know how to do it?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding page to top navigation menu’ is closed to new replies.
Skip to toolbar