Sidebar – display child pages only when parent link clicked
-
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)
- The topic ‘Sidebar – display child pages only when parent link clicked’ is closed to new replies.