• Resolved cenobite

    (@cenobite)


    I am experimenting with WordPress as a CMS using the excellent CMS-Like Admin Menu plugin.

    So far, so good, and I’m loving how light weight WordPress is and how clean the output code it produces is.

    Now, what I’d really like to be able to do is have a series of parent links as the main navigation structure. Whenever one of those parent links is selected by a site visitor, the page the link targets will open as normal, but the sidebar content will change to list all child pages of that parent page.

    So, imagine the following:

    Home | About us | Our products | Our services etc, etc…

    Let’s say the “Our products” parent link has Widget A, Widget B, Widget C and Widget D as its child pages.

    Ideally I’d want those child page links to display in the sidebar as a navigation list, but only when the “Our products” parent link is clicked.

    I hope that makes sense.

    Anyhow, for those who understand what I’d like to achieve, should I be looking at PHP code for the sidebar, parent level templates with custom sidebar code for each parent level, or is there possibly (hopefully) a plugin available that anyone knows of that can do this sort of thing ?

    Thanks in advance for any pointers – if I can get this cracked I’ll have about a dozen sites to roll out over the next few weeks all powered by WordPress, with more to follow ;o)

Viewing 3 replies - 1 through 3 (of 3 total)
  • I don’t understand what you mean when you say you want widgets to be your child pages?

    Are you just saying you want specific widgets to be in the sidebar when specific pages are displayed?

    If so, you will need to use conditionals in your sidebar.php file that will include those widgets depending on the page title.

    Read up on using conditionals

    Click on my name here and see the 2 articles about “two level menus” (under my head ??

    Thread Starter cenobite

    (@cenobite)

    Wow moshu – that’s almost exactly what I’m after.

    You’ve saved me a lot of grief and this could well be what swings me away from JOOMLA and MODx et al.

    many, many thanks !

    ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sidebar – display child pages only when parent link clicked’ is closed to new replies.