WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] "wp_list_pages" doesn't append "current_page_item" class, need help... (5 posts)

  1. Spencer Hill
    Member
    Posted 3 years ago #

    "wp_list_pages" doesn't append "current_page_item" class for me anymore. I'm using 3.1 and I'm wondering if this is a bug or there is a new function or something?

    <?php wp_list_pages(); ?>

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    for me anymore

    does this mean that it did work before the upgrade to wp3.1?

    did you change other things as well?

    where do you call that function?

    is there a custom query in the code before that?

    if so, try adding wp_reset_query(); before wp_list_pages();

    http://codex.wordpress.org/Function_Reference/wp_reset_query

  3. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    I can confirm that wp_list_pages() does still append the current_page_item class properly in WordPress 3.1.

    I have a Page-based site that uses wp_list_pages() rather than custom menus, and all of my CSS that depends on the current_page_item (and its cousins) continues to work as intended.

  4. Spencer Hill
    Member
    Posted 3 years ago #

    Thank you for the confirmation Chip. This leads me to believe it's a plugin, I'll have to disable my plugins and see what's causing it. It's definitely related to the upgrade though.

    Thanks guys.

  5. Spencer Hill
    Member
    Posted 3 years ago #

    It appears that the "Classy WordPress List Pages" plugin (classy_wp_list_pages) was the culprit. I've contacted the author and he's diagnosing the issue now.

Topic Closed

This topic has been closed to new replies.

About this Topic