Forums

Help with Page.php (3 posts)

  1. Lauren
    Member
    Posted 3 years ago #

    I'm using horizontally set tabs as my Page links. I have the code for these tab links in page.php. I want the page a person is currently viewing to have a highlighted tab, and I can make that happen, but since page.php is universal for all pages, they all show the same page highlighted. So if I'm on my "About the site" page, the "About" tab will be highlighted. Then, when I go to my "Links" page, the "About" tab is still highlighted. Can you guys think of any way around this?? Thanks.

  2. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    Take the code for the tab links out of page.php and place in a file called sidebar-top.php - ensuring that you use wp_list_pages() to generate the page list so that you can make use of the current_page_item class for highlighting purposes. Then call your new sidebar in page.php using <?php get_sidebar('top'); ?>.

  3. Lauren
    Member
    Posted 3 years ago #

    Thanks, esmi. =)

Topic Closed

This topic has been closed to new replies.

About this Topic