sidebar menu
-
based on this question:
On the site I have there are different side menus on different pages. Does anyone know a way or tutorial that will show me how I can dynamically generate this without having to create separate pages templates for each section. So for example, if you in the ‘About’ section there would be a side menu that would have…
>Profile
>contact
> Request more info
and so on but the ‘Events’ section would have…
>Local events
>Local restaurants
and so on
Any suggestions?esmi gave this code in another thread
<?php if( is_page(‘About’ ) ) get_sidebar(‘two’);
elseif( is_page(‘Contact’ ) ) get_sidebar(‘three’);
else get_sidebar();?>which will work for my purposes.
Thanks esmi – that gets me going in the right direction. I’ve created 7 sidebars (one for each category) Should I populate each category with the sub page links manually or is there a way that WP can do it. So if someone is on the ‘about’ page the subpages list on the sidebar. Here’s an example of what I’m trying to do( with a lot of help) sidebar example You’ll see that as you select a parent page ‘accomodations’ the sub pages populate the sidebar
- The topic ‘sidebar menu’ is closed to new replies.