Header horizontal main menu, sidebar vertical sub-menu
-
I don’t know if this is the right place to put this. If not, please let me know which forum area is best.
I need to replicate a php/mysql site I wrote and have been maintaining for a guild of which I’m a member. Because I’m not a WP guru, this is going to be a bit of a learning curve and any direction/help/advice you can provide would be of inestimable help.
This is the site I’m converting => RDQG.org
My first challenge is to have the sub-menus for the main menu items appear in the left sidebar when the main menu item is selected. Am I correct in assuming this is a functions.php thing? Or is it something I need to write into the actual template, thereby restricting me to a custom template. I don’t see this as a bad thing, I just want to clarify which direction I should be heading.
[moved to Theme and templates forum]
-
No worries about posting in the wrong spot. Moderators can move threads around. 🙂
Yes it is possible to have both top and sidebar.
Here’s a site that I built for a friend – http://www.outofchaos.ca/
It has different sidebars when you go in the different sections.The code that you will want to modify is in the sidebar.
What I usually do is use conditionals and write something like:<?php if(is_page(2) || is_child(2)) { ?> <aside id="sub-nav" class="widget"> <ul> <li<?php if(is_page(2)){ echo' class="current_page_item"';} ?>><a href="<?php bloginfo('url');?>/products-services/">Products & Services</a></li> <?php wp_list_pages('title_li=&depth=1&child_of=2'); ?> </ul> </aside> <?php } ?>
etc …
The function is_child() is set in my functions.php and I use the code provided here – http://bavotasan.com/2011/is_child-conditional-function-for-wordpress/
Thanks! That gives me a starting place!
@christine
I have been looking for this code for some time, thanks for posting it! I have to admit that I am a bit new to css, so could you maybe help me where to put the child code and how to implement it with the pages on my site?The site is http://www.frisse-blik.eu
Thanks a mil in advance!
- The topic ‘Header horizontal main menu, sidebar vertical sub-menu’ is closed to new replies.