How to hide the menubar in a WordPress page?

8 replies
Hi,

I'm wondering on how I can hide the menubar in just one WordPress page?

I don't want to hide a page from the menubar because I know how to do that, but hide the menubar in a page.


Thanks,

Jimmy
#hide #menubar #page #wordpress
  • Profile picture of the author Jeremy Lebre
    Add this line of code to the functions.php file of your WordPress theme :

    global $post; if ($post->ID == N) { add_filter('show_admin_bar', create_function('', 'return false;')); }

    Replace N by the ID of the page.
    {{ DiscussionBoard.errors[6868859].message }}
  • Profile picture of the author taskemann
    Thanks Jeremy! I'll test it out
    {{ DiscussionBoard.errors[6869148].message }}
  • Profile picture of the author teguhyuliantos
    Also, you can use some header plugin for your purpose. Its simple and easy to do.
    {{ DiscussionBoard.errors[6870160].message }}
  • Profile picture of the author rajeevrla
    You need to use the CSS property (display: none; ) for the menubar to hide the menu on a particular page. If you'll share the actual page, I can give you the exact code that is needed to hide menubar on that particular page.

    Note: The solution provided by the Jeremy will hide the admin bar which appear on very top of the site. If this is what you want, you can go with his solution.
    Signature

    Have a great day!

    {{ DiscussionBoard.errors[6871999].message }}
    • Profile picture of the author walle
      Originally Posted by rajeevrla View Post

      You need to use the CSS property (display: none; ) for the menubar to hide the menu on a particular page. If you'll share the actual page, I can give you the exact code that is needed to hide menubar on that particular page.

      Note: The solution provided by the Jeremy will hide the admin bar which appear on very top of the site. If this is what you want, you can go with his solution.
      I could use some help with this!

      I want to hide the menu bar - not admin bar - on a specific page.

      Thanks for any help..
      {{ DiscussionBoard.errors[7933789].message }}
  • Profile picture of the author Michael71
    Signature

    HTML/CSS/jQuery/ZURB Foundation/Twitter Bootstrap/Wordpress/Frontend Performance Optimizing
    ---
    Need HTML/CSS help? Skype: microcosmic - Test Your Responsive Design - InternetCookies.eu

    {{ DiscussionBoard.errors[7933896].message }}
    • Profile picture of the author walle
      Thanks for the info.. Google is not always so friendly.. I did the G search before posting here.. and saw that thread.. it does not really answer the question. rajeevrla offered to give the specific code to use CSS.. that is what I was asking for.
      {{ DiscussionBoard.errors[7933925].message }}
  • Profile picture of the author bigwilsy
    You can remove the code for the menu bar or set the div class or id in the CSS file to "visibility: hidden;". If you are left with a blank space then set it to "position: absolute; left: -9999px;" - this will remove it from the page.

    It might be different for wordpress, i'm not sure. Hope this helps though!
    Signature

    MySwapStore. A website designed to reinvent the way 'one to one' swapping happens on the internet. It's safe and a fun way of keeping in touch! Get your free SwapStore today at myswapstore.com!

    {{ DiscussionBoard.errors[7935709].message }}

Trending Topics