• I am using static pages with tabs. In Settings > Reading I have Front page: Home, and
    Posts page: Blog. When I am on Blog page the Home tab and Blog tabs are highlighted. When I am on the Home page, no tab is highlighted.

    Here is the code in my header which I believe is calling the highlight tabs:

    <div id="foxmenucontainer">
                            <div id="foxmenu">
    
    <ul>
                    <?php if (is_page()) { $highlight = "page_item"; } else {$highlight = "page_item current_page_item"; } ?>
                            <li class="<?php echo $highlight; ?>"><a>">Home</a>
                            <?php wp_list_pages('sort_column=menu_order&depth=1&title_li=&exclude=1480'); ?>
                    </ul>
            </div>
            </div>

    I would like to simply have the Home page highlight on Home, Blog on Blog and thats it. Any help would be appreciated. Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter techstar

    (@techstar)

    Is there a better place to post these types of issues? Please advise, thanks.

    No – you just have to be a little pateient sometimes.

    Try changing:

    <?php if (is_page()) { $highlight = "page_item"; } else {$highlight = "page_item current_page_item"; } ?>

    to

    <?php if (is_page()) { $highlight = "page_item"; }
    elseif (is_front_page()) {$highlight = "page_item current_page_item"; } ?>
    Thread Starter techstar

    (@techstar)

    Ok thanks.

    That didn’t seem to change anything.

    Remember to press CTRL and F5 simultaneously when viewing an updated page/site. Or try emptying your browser cache. This should ensure that your web browser fetches a fresh copy of the page rather than serving up an out-dated copy from your own cache.

    Thread Starter techstar

    (@techstar)

    I don’t think that is the issue.

    Shift+Reload works the same on mac since we don’t have ctrl+f5.

    Thanks anyhow esmi

    Thread Starter techstar

    (@techstar)

    Is there something in Codex on this? I looked but had no luck finding anything.

    Thread Starter techstar

    (@techstar)

    $5 to paypal if anyone can figure this out. Been at it for several hours now. Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Tabs highlight issue with static pages set in Settings > Reading’ is closed to new replies.