Forums

[resolved] WP navigation (5 posts)

  1. Richard Sweeney
    Member
    Posted 3 years ago #

    Howdy,

    I've created a static site, with a page for blog posts. The WordPress navigation I've created using the function.

    <?php wp_list_pages('title_li='); ?>

    My navigation uses an active class for all the pages which works fine (current_page_item). When I view the permalink for each blog I'm trying to get the navigation to keep the class - for the page called 'blog' - even though we're not really still on the blog page.

    That is to say: when I'm looking at anything to do with the blog page - all the individual entries and comments etc - I still want the navigation to give the page 'blog' the current_page_item class.

    Any help greatly appreciated.

  2. Richard Sweeney
    Member
    Posted 3 years ago #

    The site is at:

    http://yoonchung.co.uk

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

    Try also styling on .current_page_parent

  4. Richard Sweeney
    Member
    Posted 3 years ago #

    Fantastic, been scratching my head about this one for ages! Good old WordPress, it really is a thing most awesome.

    Many thanks esmi!

  5. Shane G.
    Member
    Posted 3 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic