The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

Dynamic navigation on single post pages

  • # October 29, 2009 at 7:57 am

    Hi all,

    I am developing my very first CMS using WordPress, works great, but I am having a bit of trouble designing my single.php properly.

    My site consists of three main pages, each with corresponding subpages, seen here.
    The navigation is created in the mutual header, below is the complete code to be precise.

    < ?php switch (is_page(21) || is_page(8) || is_page(295)) { case parentpage: ?>
    < ?php if(is_page(21) || is_page(8) || is_page(295)) : ?>

    < ?php endif; ?>
    < ?php break; default: ?>
    < ?php if($post->post_parent)
    $children = wp_list_pages(“title_li=&child_of=”.$post->post_parent.”&echo=0″);
    $children = wp_list_pages(“title_li=&child_of=”.$post->ID.”&echo=0″);
    if ($children) { ?>

    < ?php } }?>

    Now my problem is that the navigation doesn’t show on my single.php pages (e.g.)

    What code do I need for the navigation to show even on these pages?



Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed