Hi,
Could anybody tell me that how to remove default wordpress menu?
Rgds,
Ritesh
Hi,
Could anybody tell me that how to remove default wordpress menu?
Rgds,
Ritesh
Try adding a widget to the sidebar.
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 -
Hi Esmi/Saildude,
I am at Dashboard >> Appearance >> Widgets, but which widget i should add to the sidebar?
Rgds,
RSK
Which "default wordpress menu" are you trying to remove?
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
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.
Hi Macmanx,
Trick worked!! you are a champ.
Thanks to you.
Rgds,
RSK
You're welcome!
This topic has been closed to new replies.