Viewing 9 replies - 1 through 9 (of 9 total)
  • Try adding a widget to the sidebar.

    Thread Starter riteshskumar

    (@riteshskumar)

    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

    Dashboard >> Appearance >> Widgets –

    Thread Starter riteshskumar

    (@riteshskumar)

    Hi Esmi/Saildude,

    I am at Dashboard >> Appearance >> Widgets, but which widget i should add to the sidebar?

    Rgds,
    RSK

    Moderator James Huff

    (@macmanx)

    Which “default wordpress menu” are you trying to remove?

    Thread Starter riteshskumar

    (@riteshskumar)

    Hi Macmanx,

    Thanks for your reply.

    If you go to my page 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

    (@macmanx)

    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

    (@riteshskumar)

    Hi Macmanx,

    Trick worked!! you are a champ.

    Thanks to you.

    Rgds,
    RSK

    Moderator James Huff

    (@macmanx)

    You’re welcome!

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

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