WordPress.org

Ready to get started?Download WordPress

Forums

Current tab fold page list (1 post)

  1. Mark Thomas Gazel
    Member
    Posted 8 years ago #

    Hi

    I'm using the Fold Page List plugin. And I think my problem is a plugin problem.

    I have this site.

    http://www.kulturvesterbro.dk/

    With tabbed navigation.

    Tab 2,3 and 4 are just Pages. The Fold Page plugin works fine on them. Tab is highlightet while browsing subpages i the sidebar etc. due to the styling af current_page_item and current_page_ancestor.

    On the home page (Forside) there is blog, archives and subpages in the sidebar. The parent Page is called "Forside" has ID "15" and post-slug "forside". Here I used this bit of code from the Regulus Theme.

    <li <?php if (((is_home()) && !(is_paged())) or (is_archive()) or (is_single()) or (is_paged()) or (is_search())) { echo "class=\"current_page_item\""; } ?> >" >Forside

    Which keeps the Home tab highlighted while browsing blog, archives etc., but not the pages. I don't know why.

    I've tried

    http://codex.wordpress.org/Dynamic_Menu_Highlighting

    With this piece of code

    <?php if ( is_page('post-slug') ) { $current = 'highlight'; } ?>

    <style type="text/css">
    #<?php echo $current; ?> {
    background: #fff !important;
    color: #9c4f4f !important;
    }
    </style>

    <li id="highlight" ... the rest of the code <?php if (((is_home()) && !(is_paged())) etc. ...>

    Doesn't work either.

    Is there some trick or stuff I could add? I've tried adding "or (is_page())" to the

  2. -tag but that makes the Forside/Home tab highlighted ALL the time ... "or (is_page('post-slug'))" and doesn't work either.

    Frustrating.

    All suggestions will be appreciated.

    Mark

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags