how to remove the top menu

Latest Reply from Mark Klerks at 2013-07-02 13:52:14 Solution
Hi, I am a novice web guy just trying to design my own site so i dont have to pay anyone. I am curious if someone could help me figure out how to remove the top menu altogether. I want just the menu below the logo.

www.killtheshave.com

thanks
Hello,

You have several ways to do that, i will write all of them and you can pick up the best solution for yourself ( your web, your design, your way! ):

1. Manage Menus:
You can manage your menu's position, so they never appears on the secondary menu. log in your WP Admin and go to Appearance ( left sidebar menu ), go to -> Menus. in 'Theme Location' table in main content, Set your 'Top Menu' to 'Null' and set your 'Main Menu' to 'Main' ( in my theme it is Null / Main, it may be different in your theme ).

2. Hide them:
You can hide them with CSS and it's a good way to keep your codes clear if you unable to do first solution successfully. Just go to your YourThemeDirectory ( wp-content\themes\linuxd\ ) and add open Style.css with notepad or some editor and add this code to last Line

#menu-box { visibility:hidden; }

and if you would like to remove the background ( a gray line for secondary menu ) above your logo too Open Style.css with notepad or some editor and remove this following row in your Style.css ( following row is Line 24, in Body attribute tags just in your theme )

background: url("images/top.png") repeat-x scroll 50% top transparent;


3. Change PHP and HTML codes to remove whole of Secondary Menu:
You can remove PHP and HTML codes to remove whole of your Secondary Menu. Go to YourThemeDiretory ( wp-content\themes\linuxd\ ) and open Top.php with notepad or some editor and find ->

<div id='menu-box'>

and

<div id='secondarymenu'>

and

<?php wp_nav_menu('depth=0&theme_location=sec-menu&container_class=menu-topmenu-container&menu_class=menus menu-topmenu&fallback_cb=block_sec_menu'); ?>


and the two next </div> tags

and remove all of them. the above rows must remove clearly. Watch out when you removing them. first take a back up of your Top.php

mean you should remove

<div id='menu-box'>
<div id='secondarymenu'>
<?php wp_nav_menu('depth=0&theme_location=sec-menu&container_class=menu-topmenu-container&menu_class=menus menu-topmenu&fallback_cb=block_sec_menu'); ?>
</div>
</div>

codes together!

you still can follow second solution after following third solution if you would like to remove that background.

the First solution works in all themes,
the Second solution is specific for Linuxd theme,
the Third Solution works in all themes.

Hope Work,
Have fun!
wow! that was quick and worked like a charm. thanks!
Great solutions. I got 1 little problem. If i open the site with a mobile i get 2 menus with "go to ...". the first one is emtpy. the second has al the menu items i want. How can i delete the first one?
Thanks
I found the solution.

Also delete
		<?php smt_mobile_menu('sec-menu'); ?>


from top.php
I wotks great now!

Leave a reply

Add codeAdd image