Title: remove default wordpress menu
Last modified: August 19, 2016

---

# remove default wordpress menu

 *  Resolved [riteshskumar](https://wordpress.org/support/users/riteshskumar/)
 * (@riteshskumar)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/remove-default-wordpress-menu/)
 * Hi,
 * Could anybody tell me that how to remove default wordpress menu?
 * Rgds,
    Ritesh

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/remove-default-wordpress-menu/#post-1490237)
 * Try adding a widget to the sidebar.
 *  Thread Starter [riteshskumar](https://wordpress.org/support/users/riteshskumar/)
 * (@riteshskumar)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/remove-default-wordpress-menu/#post-1490264)
 * Hi Esmi,
 * I am very new to wordpress and to php as well. I don’t understand high level 
   difinition.
 * Could you please elaborate in low level language?
 * Rgds,
    RSK
 *  [saildude](https://wordpress.org/support/users/saildude/)
 * (@saildude)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/remove-default-wordpress-menu/#post-1490266)
 * Dashboard >> Appearance >> Widgets –
 *  Thread Starter [riteshskumar](https://wordpress.org/support/users/riteshskumar/)
 * (@riteshskumar)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/remove-default-wordpress-menu/#post-1490273)
 * Hi Esmi/Saildude,
 * I am at Dashboard >> Appearance >> Widgets, but which widget i should add to 
   the sidebar?
 * Rgds,
    RSK
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/remove-default-wordpress-menu/#post-1490276)
 * Which “default wordpress menu” are you trying to remove?
 *  Thread Starter [riteshskumar](https://wordpress.org/support/users/riteshskumar/)
 * (@riteshskumar)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/remove-default-wordpress-menu/#post-1490277)
 * Hi Macmanx,
 * Thanks for your reply.
 * If you go to my page [http://www.rashmi.net/](http://www.rashmi.net/), you can
   see top horizontal menu – home, about, guest writer, daily video, contact me….
 * I want to remove this menu.
 * Regards,
    RSK
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/remove-default-wordpress-menu/#post-1490278)
 * In your theme’s `header.php` file, remove the following section:
 *     ```
       <div id="nav">
       <?php function get_the_pa_ges() {
         global $wpdb;
         if ( ! $these_pages = wp_cache_get('these_pages', 'pages') ) {
            $these_pages = $wpdb->get_results('select ID, post_title from '. $wpdb->posts .' where post_status = "publish" and post_type = "page" order by ID');
   
          }
         return $these_pages;
        }
   
        function list_all_pages(){
   
       $all_pages = get_the_pa_ges ();
       foreach ($all_pages as $thats_all){
       $the_page_id = $thats_all->ID;
   
       if (is_page($the_page_id)) {
         $addclass = ' class="current_page"';
         } else {
         $addclass = '';
         }
       $output .= '<li' . $addclass . '><a href="'.get_permalink($thats_all->ID).'" title="'.$thats_all->post_title.'"><span>'.$thats_all->post_title.'</span></a></li>';
       }
   
       return $output;
        }
       ?>
       <ul>
       <?php
   
       if (is_home()) {
         $addclass = ' class="current_page"';
         } else {
         $addclass = '';
         }
       echo "<li" . $addclass . "><a href='" . get_option('home') . "' title='Home'><span>Home</span></a></li>";
       echo list_all_pages();?>
       </ul>
   
       <div class="cleared"></div>
       </div> <!-- Closes Nav -->
       ```
   
 * You may have to edit the `style.css` file a little bit to tighten up spacing 
   if any undesirable gap is left by removing the nav menu.
 *  Thread Starter [riteshskumar](https://wordpress.org/support/users/riteshskumar/)
 * (@riteshskumar)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/remove-default-wordpress-menu/#post-1490282)
 * Hi Macmanx,
 * Trick worked!! you are a champ.
 * Thanks to you.
 * Rgds,
    RSK
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/remove-default-wordpress-menu/#post-1490284)
 * You’re welcome!

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘remove default wordpress menu’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 4 participants
 * Last reply from: [James Huff](https://wordpress.org/support/users/macmanx/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/remove-default-wordpress-menu/#post-1490284)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
