WordPress.org

Ready to get started?Download WordPress

Forums

How can I REMOVE the menu? (9 posts)

  1. laszlo17
    Member
    Posted 6 months ago #

    Hi Guys,

    My visitors will find my web pages through links sent to their emails. I don't want they to navigate on my site, so I don't need the menu. Maybe on some of the pages it could appear, but most of the pages should have no menu.
    How can I remove the menu (and free up the space of the menu bar)?
    Can I make it appear only on some of the pages?

    Thanks!

  2. neiloughton
    Member
    Posted 6 months ago #

    I might be able to take a look at this if you show me your site. You do not have to have a menu on your site, but you will need to create custom page templates if you want the menu to appear on some not others.

  3. alchymyth
    Forum Moderator
    Posted 6 months ago #

    will depend on your theme;

    please post a link to your site or at least post the name and download link of your theme.

    you will likely need to edit header.php of your theme;
    there might also be a CSS fix to only hide the menu from the screen but it would still be accessible in the html in the browser.

  4. laszlo17
    Member
    Posted 6 months ago #

    Here is my sie:

    http://www.newbiesuccess.info/

    Some of the pages will remain accessible through the "Read More" buttons, the rest are unaccessible from the Home page.

    My theme is (Black) Hero .

    Thanks!

  5. alchymyth
    Forum Moderator
    Posted 6 months ago #

    to permanently remove the menu, remove this whole code section from header.php:

    <!--menu-->
    
    		<div id="menubar">
    
    	<?php $navcheck = wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary', 'menu_class' => 'nav' ,'fallback_cb' => '', 'echo' => false ) ); ?>
    
    	 <?php  if ($navcheck == '') { ?>
    
    	<ul class="nav">
    		<li class="page_item"><a href="<?php echo home_url(); ?>" title="Home">Home</a></li>
    		<?php wp_list_pages('title_li=&sort_column=menu_order'); ?>
    
    	</ul>
    <?php } else echo($navcheck); ?> 
    
    	</div>
    
    	<!--menu end-->

    or try a CSS quick fix by adding this to style.css of the theme, possibly at the very end, or preferrable via a custom CSS plugin:

    #menubar { display: none; }
    #header_container hr { display: none; }

    the second line of CSS is optional to remove the white line which looks odd without the menu.

    if this does not work, please post in the theme's forum at http://wordpress.org/support/theme/hero/

  6. laszlo17
    Member
    Posted 6 months ago #

    I tried the CSS quick fix, it works. Thanks!

  7. Mark Pedersen
    Member
    Posted 6 months ago #

    Hello, I was wondering if you care about SEO on your website? If you are doing anything active about SEO it might hurt your site using a css display:none to hide the menu, instead of removing the html.

  8. laszlo17
    Member
    Posted 6 months ago #

    Thank you Mark. I have a long way to get there, but I will surely need to closely consider your advice.

  9. esteeflo
    Member
    Posted 3 months ago #

    I was wondering how to do the same thing but just remove the menu from one page (My landing page) in the retina theme?

    any help?

    thanks

Reply

You must log in to post.

About this Topic