How to hide the menubar in a WordPress page?

by 8 replies
12
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
#programming #hide #menubar #page #wordpress
  • Add this line of code to the functions.php file of your WordPress theme :

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

    Replace by the ID of the page.
  • Thanks Jeremy! I'll test it out
  • Also, you can use some header plugin for your purpose. Its simple and easy to do.
  • 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.
    • [1] reply
    • 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..
    • [1] reply
    • 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.
  • 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!

Next Topics on Trending Feed