• Dear WordPress Pro’s,

    I would like to ask how I can get to make the wp_list_pages give the current page the “current_page_item” class when it’s requested twice.

    I have a menu in the header section of the site but also in the Sidebar.
    Now In the first wp_list_pages request it is actually highlighted because of the class current_page_item. But when I wp_list_pages it again it doesn’t give a current page class…

    Any1?

    Greeting,
    Rick Lamers

Viewing 10 replies - 1 through 10 (of 10 total)
  • can this be seen somewhere?
    without a link, there is not much to comment on this issue.

    did you check the html code in the browser to see if there are no ‘current_page_item’ classes with the second page list?

    Thread Starter Rick Lamers

    (@rickylamerz)

    https://pulpfix.nl/index.php/videos/motion-graphics/ << Here’s the link.

    I did check for the class but it’s not there…

    i think it is not a failure of the wp_list_pages() –

    there is probably a custom query in the main bit of the page, that is changing the querystring.

    try to add a ‘wp_reset_query();’ before you get the sidebar.

    Thread Starter Rick Lamers

    (@rickylamerz)

    How do you know stuff like this!? ??

    It’s crazy you fixed it!

    Thank you, very very much.

    you are welcome.

    ‘wp_reset_query();’ is a little known panacea (cure-all) for many problems after custom queries.

    Thread Starter Rick Lamers

    (@rickylamerz)

    Ill keep that in mind ?? Are you a developer for WordPress or..?

    let us say, i do like problem solving; and i always liked logic and programming.
    if i am getting too bored, i do sodukos.

    and, yes, i do some theme programming as well.

    Thread Starter Rick Lamers

    (@rickylamerz)

    Haha ok cool, Im getting more and more familiar with programming PHP and jQuery and I pretty much master HTML/CSS which isn’t that hard .. ??

    You have a portfolio? Since you’r more advanced then I am I could maybe learn some things ??

    Thanks for the tips !

    ruleone

    (@ruleone)

    alchymyth, I love you. Brilliant. This has been plaguing me for months, because I couldn’t find the answers. Turns out I was asking the wrong questions. ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Multiple wp_list_pages give no current page class…’ is closed to new replies.