• Hi

    I am building a site using WP as a CMS. All well and good with the pages, which cover five subject (parent) areas. I have worked out how to make a horizontal dynamic nav bar containing each of the five parent pages, with appropriate child-menus appearing in the left col when I am in each parent. (and parent and current child are highlighted when active) Great.

    Problem is that my sixth parent is where I would like the posts (as opposed to pages) all to appear (it’s being called ‘resource centre’) and it will mostly be stuff like press releases and factsheets, so ideally suited to posts rather than pages. There will also be some static pages in this area.

    So simply, how do I make the resource centre parent link on the horizontal nav bar in the header highlighted when a post is being visited? I have searched for ages for an answer and can’t find one. Am I missing something really basic? Most sites seem to have parent pages of eg ‘home’ ‘contact’ ‘about us’ and ‘blog’ and all the posts sit in the blog area, so what I’m looking for is pretty standard!

    Help please please 😉

Viewing 3 replies - 1 through 3 (of 3 total)
  • Julia, how have you set up the horizontal dynamic nav bar?

    Thread Starter juliageek

    (@juliageek)

    like this.

    Any ideas?

    Thankd

    Thread Starter juliageek

    (@juliageek)

    OK, I’ve sorted it.
    I made a new template which has the list from my horizontal navbar with the sixth parent (‘resource centre’) with the li.active class that highlights it. (easily done by copying the source code from the generated web page when it is active) I saved this as archivenav.php.

    In header.php, I inserted the following where the dynamic navbar went:

    <ul id="">
    <?php if (is_page()) echo wswwpx_fold_page_list ('depth=1&title_li='); ?>//this is the menu for the pages - NB uses fold page list plugin.
        <?php if (is_archive() || is_single()) include (TEMPLATEPATH . '/archivenav.php'); ?>//this calls the list with the highlighted 'resource centre' for all posts and archive pages.
    </ul>

    Now I’m down to working out how to include static pages and post categories in a sidebar nav list that looks like it’s all the same thing…..

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to make all posts appear in one area in hierarchical menu?’ is closed to new replies.