How to hide the menu from ONE page in wordpress?

18 replies
  • WEB DESIGN
  • |
Hey everyone,

I have a (hopefully) easy question. I'm currently making a squeeze page using a wordpress theme (WP-Spire to be exact) and would like to hide the entire menu button from that squeeze page. How would I go about doing this? I searched plugins to find something along these lines, but could only find plugins that exclude pages from showing in the menu, not the other way around.

Any suggestions?
#hide #menu #page #wordpress
  • Profile picture of the author kkoechel
    Originally Posted by Whothar View Post

    Hey everyone,

    I have a (hopefully) easy question. I'm currently making a squeeze page using a wordpress theme (WP-Spire to be exact) and would like to hide the entire menu button from that squeeze page. How would I go about doing this? I searched plugins to find something along these lines, but could only find plugins that exclude pages from showing in the menu, not the other way around.

    Any suggestions?
    if you mean permanently, I would go find it in the php files and comment it out
    {{ DiscussionBoard.errors[2961047].message }}
  • Profile picture of the author gyar29
    Using the php if...else statement works in this instance.

    In WP pages have unique identifiers.

    You can insert an if...else statement in your template that states if the page loaded is the squeeze page then don't load whatever it is you don't want to load. If it isn't then load it. Fairly simple coding.

    The unique identifier for the page can be found above the WP text editor in the admin panel when you edit the page. It is embedded in the page url. It will look like this hxxp://yoursite.com/?page_id=unique_identifier.

    Take Care,
    Gene
    {{ DiscussionBoard.errors[2966059].message }}
  • Profile picture of the author promo_guy
    You could always try to create a unique page template and simply not include any navigation links in the html. Might be easier that way.

    Or as Gene suggests
    {{ DiscussionBoard.errors[2967039].message }}
  • Profile picture of the author tknoppe
    Just as promo_guy suggested: I usually create a custom page template that does not include the site menu and choose that page template when creating the sales page.
    Signature

    Traci Knoppe, OBM, Launch & Project Manager
    Your Web Tech Team

    {{ DiscussionBoard.errors[2967558].message }}
  • Profile picture of the author RichardWing
    Does anyone know of a wordpress plugin that will exclude menus on a per page basis that are set for a theme from a pages edit screen?

    Richard Wing
    623-505-6302
    skype - richardwing
    Signature

    Recent Release | FB Chat & Menu Widget Generator http://supersellertools.com/wpfbchatwidget/

    http://www.SuperSellerSupport.com | My Facebook Profile http://facebook.com/azrichardwing

    {{ DiscussionBoard.errors[8839461].message }}
    • Profile picture of the author RobinInTexas
      Originally Posted by RichardWing View Post

      Does anyone know of a wordpress plugin that will exclude menus on a per page basis that are set for a theme from a pages edit screen?

      Richard Wing
      623-505-6302
      skype - richardwing
      There's probably no plugin, the way to do it is with a Custom Page template, as explained in the Codex.
      Signature

      Robin



      ...Even if you're on the right track, you'll get run over if you just set there.
      {{ DiscussionBoard.errors[8839866].message }}
  • Profile picture of the author themubeen
    just user following syntex in you css file.
    .page-name .menu-name{display:none;}

    kindly change the page-name with your page name and menu name as well.
    this is the easiest way to do.
    Signature
    WordPress Expert
    Starts from $97 only
    To Order add me to skype: themubeen

    {{ DiscussionBoard.errors[8840131].message }}
    • Profile picture of the author wags1970
      Hi there, your main menu is usually located in the header.php so if you were to create a custom page template you would still need to create a seperate header.php if you create a file in your theme files called header2.php and then copy the code from header.php to header2.php and then remove the nav code, i header2.php you could then add the code <?php include 'header2.php'; ?> to your new custom page template without it affecting the rest of your website/theme.

      remember to save the theme files somewhere in case you update your theme/website at sometime , hope this helps

      regards paul
      {{ DiscussionBoard.errors[8840368].message }}
    • Profile picture of the author Rollmodl
      Originally Posted by themubeen View Post

      just user following syntex in you css file.
      .page-name .menu-name{display:none;}

      kindly change the page-name with your page name and menu name as well.
      this is the easiest way to do.
      What he said.
      {{ DiscussionBoard.errors[8840466].message }}
    • Profile picture of the author nettiapina
      Originally Posted by themubeen View Post

      just user following syntex in you css file.
      .page-name .menu-name{display:none;}

      kindly change the page-name with your page name and menu name as well.
      this is the easiest way to do.
      This is the most simple advice. View the page HTML and see if there's something unique in <body> tag's class attributes. Many well-coded themes insert the page id there. Then you can just use the trick above (but replace ".page-name" with the string that has the page id).
      Signature
      Links in signature will not help your SEO. Not on this site, and not on any other forum.
      Who told me this? An ex Google web spam engineer.

      What's your excuse?
      {{ DiscussionBoard.errors[8847370].message }}
      • Profile picture of the author RobinInTexas
        Originally Posted by nettiapina View Post

        This is the most simple advice. View the page HTML and see if there's something unique in <body> tag's class attributes. Many well-coded themes insert the page id there. Then you can just use the trick above (but replace ".page-name" with the string that has the page id).
        It might be simple, but I think it's lazy and a bad idea. You are delivering content to Google that is different from what visitors are seeing. Google doesn't like that on principle and doesn't bother to try to figure out who you are trying to put something over on. They may just penalize you and move on to competitors who know how to render content properly.
        Signature

        Robin



        ...Even if you're on the right track, you'll get run over if you just set there.
        {{ DiscussionBoard.errors[8847679].message }}
  • Profile picture of the author Mollywhite
    you can edit that in the php file.
    {{ DiscussionBoard.errors[8844804].message }}
  • Profile picture of the author Marketer Matt
    The display:none option that themubeen said should work the best... unless you only want to make the menu disappear on one page. In that case, you could either use the if / else statement mentioned above OR better yet, you could simply create a new page template that you can select from the Template drop-down whenever you make a page that will have it's own styling and layout. This way you could make more than one landing page if you needed to.

    I can do that for you if you'd like. Should be a cheap easy fix. Just let me know.
    {{ DiscussionBoard.errors[8847176].message }}
  • Profile picture of the author joe ferdinando
    Originally Posted by Whothar View Post

    Hey everyone,

    I have a (hopefully) easy question. I'm currently making a squeeze page using a wordpress theme (WP-Spire to be exact) and would like to hide the entire menu button from that squeeze page. How would I go about doing this? I searched plugins to find something along these lines, but could only find plugins that exclude pages from showing in the menu, not the other way around.

    Any suggestions?
    wp-hide-pages is a plugin that allows you to hide pages and remove them from the menu!
    Signature
    {{ DiscussionBoard.errors[8847778].message }}
  • Profile picture of the author sham2
    If have you some experience in php coding, then it is very easy for you. Just use
    <?php
    if ($page=1) {
    echo "hide menu";
    } elseif ($page=2) {
    echo "Show menu";
    }
    ?>
    {{ DiscussionBoard.errors[8851630].message }}
    • Profile picture of the author RobinInTexas
      Where did you come up with this?

      Originally Posted by sham2 View Post

      If have you some experience in php coding, then it is very easy for you. Just use
      <?php
      if (=1) {
      echo "hide menu";
      } elseif (=2) {
      echo "Show menu";
      }
      ?>
      That code will not do anything but print the words hide menu or Show menu somewhere on the page, probably at the top or bottom of the page.
      Signature

      Robin



      ...Even if you're on the right track, you'll get run over if you just set there.
      {{ DiscussionBoard.errors[8853293].message }}
  • Profile picture of the author AllenMack
    Hi friend, i just youtube it and found what you are looking for https://youtu.be/G5H7OWAcGxk
    hope it helps
    {{ DiscussionBoard.errors[10714899].message }}
  • Profile picture of the author 3wCorner
    Just create a new page template for your squeeze page but do not call in the menu php script. Then create a new page, use the template , and post your contents.
    {{ DiscussionBoard.errors[10715571].message }}

Trending Topics