• I am using WordPress 3.0 with the Kinyonga theme and I was wanting to know how I can keep certain pages from showing up on the top navigation menu bar. I know on some themes you can do this in the theme options page but this particular theme doesn’t have that. I want to keep these pages on the sidebar navigation menu but lose them on the top header bar.

    I am confused by this problem and I like this theme but I don’t want all the pages showing on the top bar.

    You can find the site at https://musicoverdrive.com

    Thanks in advance for any help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • as your theme seems to be using wp_list_pages() to generate the page nav, you can edit this (probably) in header.php;

    https://codex.www.ads-software.com/Function_Reference/wp_list_pages
    https://codex.www.ads-software.com/Function_Reference/wp_list_pages#Exclude_Pages_from_List

    the existing code is probably very much like:
    <?php wp_list_pages('title_li='); ?>

    change to:
    <?php wp_list_pages('title_li=&exclude=3,23,27,55'); ?>

    using comma-separated page ID of the pages you want to exclude

    Thread Starter powerleg

    (@powerleg)

    Thanks for the response. It didn’t have the wp list pages anywhere in the header.php file. It has like <div id=”nav_menu1″ class=”menu”>
    <?php nav_menu(1); ?>
    </div>
    So I added this code to try it <?php wp_list_pages(‘orderby=name&exclude=465,467,469,471,473,501,508,522,537,547,554,562,569,590’); ?>

    And now it is pretty screwed up looking on the home page. I have to leave for a while here now so I guess it will have to stay like it is until I get back. I hate that but I don’t have time now to try and get it back like it’s supposed to look.

    I might have it so screwed up later I will have to change themes to get it back to looking like it should.

    the menus are defined in functions.php; dependent on the option settings of the theme.

    edit functions.php of your theme; find: (line 300++)

    function nav_menu($nav_menu) {
    	global $options;
    	$nav_menu_show = "nav_menu" . $nav_menu . "_show";
    	$nav_menu_type = "nav_menu" . $nav_menu . "_type";
    	$nav_menu_dropdown = "nav_menu" . $nav_menu . "_dropdown";
    	if($options[$nav_menu_dropdown]) $depth = "";
    	else $depth = "&depth=1";
    	if($options[$nav_menu_show]){
    		echo "<ul>";
    		switch($options[$nav_menu_type]){
    			case 'categories':
    				wp_list_categories('title_li='.$depth);
    				break;
    			case 'pages':
    				wp_list_pages('title_li='.$depth);
    				break;
    		}
    		echo "</ul>";
    	}
    }

    and change the line with (quite at the end of the above code):
    wp_list_pages('title_li='.$depth);
    into:
    wp_list_pages('title_li='.$depth.'&exclude=465,467,469,471,473,501,508,522,537,547,554,562,569,590');

    btw: nice theme

    Thread Starter powerleg

    (@powerleg)

    I made the changes and updated the file and got this:
    Parse error: syntax error, unexpected T_BREAK in /home/powerleg/public_html/musicoverdrive.com/wp-content/themes/kinyonga/functions.php on line 315

    I can’t seem to get it back the way it was. This is where I usually have to delete the theme and pick another one. Have I mentioned I hate wordpress yet?

    Now it won’t let me change the theme either. It seems like it should be simple enough to make this one change without wiping out everything and starting from scratch again with a new wordpress installation.

    Maybe I can get another theme installed from the web host cpanel.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Page Navigation Menu Bar’ is closed to new replies.