Support » Themes and Templates » "wp_list_pages" doesn't append "current_page_item" class, need help…

  • Resolved Spencer Hill

    (@ws5f3dj7)


    “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(); ?>

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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

    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.

    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.

    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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘"wp_list_pages" doesn't append "current_page_item" class, need help…’ is closed to new replies.