How to display both categories and pages as menu with iNove WordPress theme.

This post shows you how to display both categories and pages as menu with iNove WordPress theme. The original chinese post was made by Foolant, I just rewite it in English here to archive. So credit belongs to Foolant, not me.

Ok, firstly, please backup your files /wp-content/themes/inove/functions.php and /wp-content/themes/inove/templates/header.php :D before doing.

1- Open /wp-content/themes/inove/functions.php

Find:

<?php _e(‘Show categories as menu.’, ‘inove’); ?>

Add the following code AFTER “</label>”. It means that you add 1 more  <label></label> group.

<label>
<input name=”menu_type” type=”radio” value=”all” <?php if($options['menu_type'] == ‘all’) echo “checked=’checked’”; ?> />
<?php _e(‘Show both in menu.’, ‘inove’); ?>
</label>

2-Open /wp-content/themes/inove//templates/header.php

Find with these key words:

if($options['menu_type'] == ‘categories’) {

You will see a complete group of code like:

if($options['menu_type'] == ‘categories’) {
wp_list_categories(‘title_li=0&orderby=name&show_count=0′);
} else {
wp_list_pages(‘title_li=0&sort_column=menu_order’);
}

Replace that group with the following code:

if(($options['menu_type'] == ‘categories’)||($options['menu_type'] == ‘all’)){
wp_list_categories(‘title_li=0&orderby=name&show_count=0′);}

if(($options['menu_type'] == ‘pages’)||($options['menu_type'] == ‘all’)) {

wp_list_pages(‘title_li=0&sort_column=menu_order’);}

It should be noted that the order of  these codes will determine the order of Categories or Pages on the menu.

Then just login to the Administrator Zone, go Current Theme Options, and choose “Show both in menu.” at the menu bar. That’s it.