Worpress Sidebar Menus – Horizontal or Vertical?

Have been through lots of WordPress themes, and they almost always contain horizontal menus across the top as a top menu, or top navigation bar.

Instead, if you want to run your navbar down the left side as a vertical sidebar menu, you are very limited in theme choices.

I re-use a theme and re-theme it until I find a good solution, and a good and straightforward one.

Here’s what I’ve collected so far on the subject:


Try placeing this code in your header or where ever your menu is called from. You should have something like this right now?

<ul class="menu">
      <?php wp_list_pages('depth=1&sort_column=menu_order&title_li='); ?>
</ul>

try making it this:

<div class="menu">
	<ul>
		<?php wp_list_pages('depth=1&sort_column=menu_order&title_li='); ?>
	</ul><br />
<?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; ?>
		<?php } ?>
	</ul>
</div>

By replacing the code you mentioned it changes the horizontal menu into a vertical menu,see http://blog.narrowminds.nl/ to view what I mean.

I have already tried drop down menu plugins but I could not find a plugin that is really easy editable (css) to make the lay-out the way I want it.


Leave a comment