Forums
Forums / Fixing WordPress / Multi-Level navigation menus
(@dennymathews)
17 years, 5 months ago
Hi ~
I’m using a free theme where I want to implement the drop-down child menus in the nav bar. I’ve tried the following code to display the child pages as a drop-down but it doesn’t work.
<?php if($post->post_parent) $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); else $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0"); if ($children) { ?> <ul> <?php echo $children; ?> </ul> <?php } ?>
I don’t know if my CSS is the problem or maybe the PHP code. Can someone help me?
(@sbiehle)
Have you tried using the CSS on Darren Hoyt’s example of this?
The topic ‘Multi-Level navigation menus’ is closed to new replies.