• Resolved Heropass

    (@heropass)


    Ok so I wanted a static page for my site as seen here: https://automata-theatre.netau.net/ and I made it through reading settings. The only problem I am having is that this template has a static “Home” page tab in the top menu. So I have two “home” tabs. I was wondering how I could change this. This template from what I can tell doesn’t have the code wp_list_pages in the header.php but instead has this code:

    <!-- begin top menu -->
    		<div id="topMenu">
    		<?php if ( function_exists( 'wp_nav_menu' ) ){
    				wp_nav_menu( array( 'theme_location' => 'top-links', 'container_id' => 'topLinks', 'fallback_cb'=>'toplinks') );
    				}else{
    					toplinks();
    				}?>
    				</div>
    		<!-- end top menu -->

    So what do I have to do, change, to get this issue worked out, please?

    Thanks in advance!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Try adding:

    function my_page_menu_args( $args ) {
    	$args['show_home'] = false;
    	return $args;
    }
    add_filter( 'wp_page_menu_args', 'my_page_menu_args' );

    to your theme’s functions.php file.

    Thread Starter Heropass

    (@heropass)

    I tried adding it, but it didn’t do anything for me. Was there a specific place this code is supposed to go inside functions.php. I added this code to:

    }	
    
    if ( function_exists( 'wp_nav_menu' ) ){
    	if (function_exists('add_theme_support')) {
    		add_theme_support('nav-menus');
    		add_action( 'init', 'register_my_menus' );
    		function register_my_menus() {
    			register_nav_menus(
    				array(
    					'top-links' => __( 'Top Links' ),
    					'main-menu' => __( 'Main Menu' ),
    					'footer-links' => __( 'Footer Links' )
    				)
    			);
    		}
    	}
    }

    Could you show me where exactly I ought to paste this code?

    Don’t add it to an existing function. Just add it to the functions.php file after the <?php and before the ?> tags.

    Thread Starter Heropass

    (@heropass)

    No luck then. It doesn’t work for me.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to get rid of default Home Page tab in menu?’ is closed to new replies.