Skip to:
Content
Pages
Categories
Search
Top
Bottom

New Page Selected

  • @gerikg

    Participant

    I noticed when you add a page it doesn’t show up on the top nav

    so I added the following code:

    <?php wp_list_pages('title_li='); ?>

    I’m using the default BPhome theme. When you click on “Members” it becomes highlighted.

    How do I make the new pages do the same?

Viewing 2 replies - 1 through 2 (of 2 total)
  • @djpaul

    Keymaster

    This is not a BP question, but a WP theme question! A quick Google of that function took me to https://codex.wordpress.org/Template_Tags/wp_list_pages.

    Five minutes reading revealed:

    All list items (li) generated by wp_list_pages() are marked with the class page_item. When wp_list_pages() is called while displaying a Page, the list item for that Page is given the additional class current_page_item.

    So, apply a style to .current_page_item.

    @gerikg

    Participant

    errr…

    let me try again…

    all BP Nav headers are coded with

    <li<?php if ( bp_is_page( BP_XXXX_SLUG ) ) {?> class="selected"<?php } ?>>

    if it’s the current page it will output

    <li class="selected">

    if it’s not

    <li>

    BUT when I add a page this is what I get no matter what:

    <li class="page_item page-item-#">

    The class never changes…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘New Page Selected’ is closed to new replies.
Skip to toolbar