WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WP as CMS - Check if child page is current (5 posts)

  1. alainS
    Member
    Posted 7 years ago #

    I am trying to put together a WP powered-CMS for a client.
    It will be a bunch of pages, subpages, subsubpages and on.
    I've figured out how to highlight where am I in subpages with a code found here.

    The problem is the main menu. All works fine if I am on one of main pages...than I get "current" in LI class. When I select a subpage of main page the "current" class is gone from main menu.

    Is there a code or something that will return in listpages "if child or subchild of this parent is selected" than put "class="selected" in parent too?

    Thanks in advance.
    I've checked some plugins ...they're working fine but none of them solved my specific problem. Maybe there is someone of WP punters that resolved this before? I've found several simmilar threads....but none dealing with this problem.

  2. moshu
    Member
    Posted 7 years ago #

    Actually, the fold_page_list plugin can do that.

  3. alainS
    Member
    Posted 7 years ago #

    Uhhhh ...i'm going to grab it now and test it!
    Thanks moshu for pointing me out this plugin. I've never heard of it.

  4. moshu
    Member
    Posted 7 years ago #

  5. alainS
    Member
    Posted 7 years ago #

    Yess moshu is the man :)

    I've actually tried this plugin last week but I didn't knew that it is capable using same arguments as original wp_list_pages...so I moved on to navigo, etc.
    Works like a charm.
    Thanks again moshu.

Topic Closed

This topic has been closed to new replies.

About this Topic