• I have removed the menu options from the front page via appearances-menus-edit menus, however the menu is still being displayed on the side.

    How can I force WordPress to update my site to remove the menus.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter clarcombe

    (@clarcombe)

    The link to my site if required

    Please provide a valid URL so we can see.

    Thread Starter clarcombe

    (@clarcombe)

    I tried earlier but it wouldnt let me post a link
    colinlarcombe.com

    Hii @clarcombe,

    Thats display on your theme primary menu. if u remove so display by default pages like menu.

    so go on header file and make a code like this.

    <?php
     if(!is_home()){
          wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu', 'menu_id' => 'primary-menu' ) );
     }
    ?>

    or u can add this code on function.php

    <?php
    function remove_from_home( $args ){
            if(!is_home()){
                return $args;
            }
    }
    add_filter( 'wp_page_menu_args', 'remove_from_home', 40 );
    ?>

    Thread Starter clarcombe

    (@clarcombe)

    Ravi,

    Thanks for that. I was hoping to be able to do this without altering the code and just by using the WordPress options from WordPress home.

    How would I alter the code if I had to do this. Do I physically have to go to the server and remove the offending lines from the HTML page ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Remove menus using WordPress Appearance option’ is closed to new replies.