Convert WP page listing to Horizontal Drop down menu for Categories
As a Blogger one always has to take care of his design without hampering its server load time. Most of the themes in wordpress do not come with the inbuilt “Drop down category listing” in navigation bar, instead the page listing is provided. Page listing on nav bar may not be the perfect combination as it would have been in case of Category listing.
Here I will tell you how to convert wp page listing to a horizontal drop down category listing with just one step. There might be too many ways to do so but this is one of the Blog friendly method since it does not involve any Java Script , any plugin and teasing with the CSS.
First of all sign in to your WP dashboard admin panel and goto >>Appearance >> Editor >> Header.php.
Now as shown in the screen shot search for ‘wp_list_pages’ in the “nav” section of your theme .
Now you need to replace the entire code with the following code to have the Horizontal Drop down Effect to your theme,
<?php wp_list_categories('sort_column=name&sort_order=asc&style=list&children=true&hierarchical=true&title_li=0'); ?>
which is shown in the screen shot (Check highlighted section). Once the code has been replaced , update the file and you are done.