Wednesday, June 27, 2012

Display Pages as Menu in WordPress


Adding the pages as menu's in wordpress is very simple. Only this simple piece of code makes this possible.

Where to add?
Find the place where your menus were displayed in your template files.

In most cases it will be in header.php file.
Look for the navigation links which shows the menu.
Delete all the links between <ul> and </ul> tags.
Add the following piece of code instead.

<?php wp_page_menu('show_home=1&sort_column=menu_order'); ?>

Thats it!! Done!!