WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] wp_list_pages() doesn't do what it should (2 posts)

  1. CottonIJoe
    Member
    Posted 8 years ago #

    Hello there,

    I have a problem where i just can't see any logic explanation for:

    I have two templates, which both use wp_list_pages() to show a navigation bar ("groups"). The navigation bar lists all pages whose parent's ID is stored via a custom field.
    This works very well and also marks the current page as class="current_page_item".

    I needed another navigation bar (which i called "subgroups"). Since i have implemented the second navigation bar, no page is recognized as current_page_item anymore. I have tried around whith different loops, but i didn't manage to get it to work again.

    Could you please have a look at the two templates? Perhaps there is an obvious bug which i just don't see because i'm focusing on the wrong thing ;)

    here are the files. ("groups" is the working one, "groups_with_subgroups" is the one which won't mark current pages.)

    thanks for giving it a look ;)

  2. CottonIJoe
    Member
    Posted 8 years ago #

    sorry, was my fault. the behavior is indeed not "logic", as the error results from a few lines of code i added in the header.php template file. So, "resolved".

Topic Closed

This topic has been closed to new replies.

About this Topic