• Hi,

    I’m doing a website using Pytheas theme https://www.wpexplorer.com/pytheas-free-wordpress-theme/

    There’s two navigations on theme, header and footer navigation.

    I put custom logo on theme’s own Theme Options section and lost the Home buttom from main_menu. I added it by using this code:

    <?php
    // Filter wp_nav_menu() to add additional links and other output
    function new_nav_menu_items($items) {
    	$homelink = '<li class="home"><a href="' . home_url( '/' ) . '">' . __('Etusivu') . '</a>';
    	$items = $homelink . $items;
    	return $items;
    }
    add_filter( 'wp_nav_menu_items', 'new_nav_menu_items' );

    Now Home link shows also in footer navigation, but I need to remove it from there.

    How do I remove it?

    In header navigation code is like that:

    <nav id="navigation" class="clearfix">
    
            <?php
    // Filter wp_nav_menu() to add additional links and other output
    function new_nav_menu_items($items) {
    	$homelink = '<li class="home"><a href="' . home_url( '/' ) . '">' . __('Etusivu') . '</a>';
    	$items = $homelink . $items;
    	return $items;
    }
    add_filter( 'wp_nav_menu_items', 'new_nav_menu_items' );
    
    		//output main navigation menu
    			wp_nav_menu( array(
    				'theme_location' => 'main_menu',
    				'sort_column' => 'menu_order',
    				'menu_class' => 'sf-menu',
    				'fallback_cb' => false
    			)); ?>
    
           </nav>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m sorry but as your chosen theme is only available for download behind a login, you will need to contact the theme’s developer directly for support.

    Thread Starter natjak608

    (@natjak608)

    Ok, thanks for the answer. I try figure it out, because I’m changing theme a lot anyway, for a new child theme.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to remove home link from secondary navigation?’ is closed to new replies.