WordPress.org

Ready to get started?Download WordPress

Forums

[Theme: Twenty Eleven] How Remove Pages Links from Header (2 posts)

  1. ersl
    Member
    Posted 2 years ago #

    I've searched high and low on how to remove the pages links from the header.
    I have installed "Twenty Eleven Three Menus" and been able to create a footer menu that works, and lists the pages, but whenever I create new pages the links automatically get put on the Header.
    Can some please help me, step by step, how to do a Child Theme, and the necessary coding to stop the new page links going to the header.
    If some one will do that I will provide 100 long tail buyer keywords in any chosen niche.
    ersl

  2. anstrangel0ver
    Member
    Posted 2 years ago #

    first off all in the menu in create a menu name 'Main menu'.
    and paste the code

    <?php
                    $defaults = array(
                        'container' => '',
                        'container_class' => '',
                        'menu' => 'Main Menu',
                        'echo' => 0,
                        'items_wrap' => '<ul>%3$s</ul>',
                    );
    
                    $menu_item = wp_nav_menu($defaults);
                    $menu_item = str_replace('</li>', '</li><li></li>', $menu_item);
                    $menu_item = trim($menu_item);
                    ?>
    <?php echo $menu_item; ?>

    somewhere in header.php where u wanna ur menu to locate. and in the menu section on the wp-admin panel. add the menu u wanna use for the header part. similarly . for the footer menu create a next menu name 'Footer menu'.
    `<?php
    $defaults = array(
    'container' => '',
    'container_class' => '',
    'menu' => 'Main Menu',
    'echo' => 0,
    'items_wrap' => '<ul>%3$s</ul>',
    );

    $menu_item = wp_nav_menu($defaults);
    $menu_item = str_replace('</li>', '</li><li></li>',$menu_item);
    $menu_item = trim($menu_item);
    ?>`
    <?php echo $menu_item; ?>

    and place the above code where u wanna show ur footer menus. similar to the header menu . Add your post and pages and custom menu ..

    hope this work out for u. any thing u wanna ask plz note it domn here.

    anstrangel0ver.

Topic Closed

This topic has been closed to new replies.

About this Topic