• I for the love of me can not figure out how to remove the Home Link from my Twenty Ten Child Theme.

    I have changed this line:

    $args['show_home'] = true;
    to
    $args['show_home'] = false;

    It still does not seem to want to remove the Home link. Any thoughts or help.

    http://ocpoundhounds.com

    Sean

Viewing 15 replies - 1 through 15 (of 16 total)
  • Moderator t-p

    (@t-p)

    -try clearing cache in your browser before viewing the updated page. To clear cache in your browser, press clrl+f5 keys simultaneously. Also, try different computer/different browser.

    -also, have tried removing it via:

    Dashboard => Appearnace – Menus

    Thread Starter seandavidson

    (@seandavidson)

    Yes cleared cache on browser Home under the nav bar is still there. I did not want to build a custom menu. It is easier to use it as it is for the person updating the site. Just want to be able to remove Home from the Navigation Bar.

    Moderator t-p

    (@t-p)

    you may try to search in your theme’s template ( for example, header.php, etc.) to find the code, and strike it out.

    What function is your theme using to render the navigation?

    Thread Starter seandavidson

    (@seandavidson)

    I am using the Tweny Ten Theme, I have not made any changes except make a Child Theme based on it. From the info I got from my Google search was to change this

    $args['show_home'] = true;
    to
    $args['show_home'] = false;

    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 child theme’s functions.php file.

    Thread Starter seandavidson

    (@seandavidson)

    @esmi Thanks I tried that and still no go. Here is what is in my functions.php for my child theme.

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

    Site url?

    Thread Starter seandavidson

    (@seandavidson)

    Site was listed in the first post.

    http://ocpoundhounds.com

    wordman1994

    (@wordman1994)

    seandavidson,

    I don’t know if you ever got this figured out, but I just did.

    Deactivate with a remark or remove this line from header.php:

    <?php wp_nav_menu( array( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’ ) ); ?>

    Just worked for me perfectly.

    Cheers,

    wordman

    @wordman1994
    that dumped the whole nav bar in twentyeleven theme.

    duke

    lukeratto,

    Crap. I have to admit, I only ever use and modify twentyten theme because I don’t ever do any drastic theme mods to my blogs. Hopefully someone here can help with twentyeleven.

    Cheers,

    wordman

    no worries, what’s weird is in my function.php file I’ve got it displaying

    function twentyeleven_page_menu_args( $args ) {
    $args[‘show_home’] = false;
    return $args;

    lukeratto,

    I can relate. I spent a lot of time sifting through theme mods, and it seems as though they make significant changes from one to the next. Another reason I just stick to modifying the same theme. Once you nail this for twentyeleven, stick with it from here on out unless you have enough time to hunt for the answers.

    Best of luck!

    Sincerely,

    wordman

    No reason why this would necessarily work over setting to false, but any chance that making it unset($args[‘show_home’]); might work?

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Remove Home From Header Navigation’ is closed to new replies.