Page IDs and Navigational matrix (3 posts)

  1. tcherokee
    Posted 9 years ago #

    I wanted to find out if there is a way of assigning body id based on the page that you are on. For example, if you navigate to the about page, the body id will become <body id=about-page>.

    The reason I want to do this is because I'm using a css navigational system that relies on the body id to display the a hover and active states.

    Thanks in advance for your assistance

  2. Jeremy Clark
    Posted 9 years ago #

    Why not just use this.

    if (is_home()) {$pg_li .=" current_page_item";}
    <?php wp_list_pages('title_li='); ?>

    Then whenever the link in the menu is the current page then the class current_page_item is applied to that link then you can style that class any way you want. Just a thought.

  3. tcherokee
    Posted 9 years ago #

    Thanks, gotten it to work :)

Topic Closed

This topic has been closed to new replies.

About this Topic