Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #176203

    Theme: Enfold

    We want to remove the entire top menu navigation and logo area on selected pages. Not all pages, just a few.
    We want to use the query string in the URI rather than changing a global setting using CSS so that it doesn’t affect all pages and
    we can control which pages have the top nav menu area.

    Q1. So, how do we remove the entire top navigation and logo from selected pages using an IF/Else loop in the functions file of a Child Theme?

    We prefer to do this server side rather than javascript due to reliability reasons for browsers using a PHP header request of
    $_SERVER[‘HTTP_HOST’]

    Basically this in a nutshell:

    If
    pageid=XXXX
    // remove nav id
    Else
    //show id

    I assume this is not already built into the backend of Enfold or Worldpress. If so, please share link to a reliable plugin, or specific code in your template.

    We are not asking for exact code to remove a specific page id at this point. We need a general framework for the function and
    we will be able to manipulate it from there. We are competent PHP coders.
    We do not have a online link to share because we are testing your template on Localhost using Xampp.

    Thanks.

    #176327

    Well, the feature I am asking about is pre-built into your template and it works as described. But unfortunately if selecting a Template attribute of Blank – No Header, no Footer, the entire page background turns white when using a “boxed” layout. For example, using Boxed Grunge, the entire grunge background disappears and the underlying page color behind that BG image is now white. Hard coding custom edits to the css changes nothing either. Manually adding the background properties to HTML.html_boxed does not affect the page. And of course any edits to the BODY CSS property will not be recognized because your template outputs the following <html lang="en-US" class=" html_boxed responsive "> just after the DOC type declaration.

    Is this intended or a bug?

    It is easy to replicate and check on your end with your default installation of data. Which is what we are working with. Two clicks and you’ll see the bug that I’m talking about. Select Blank as the page layout in the Dashboard Page Editor on your default Portfolio page here –> Home v5: Portfolio Style

    You’ll see quickly for yourself that the background turns white under a Boxed Grunge layout. Poof it’s gone. I haven’t tried on a full page layout, Only Boxed Grunge and Boxed Blue Styling. Same results and errors for Boxed Blue & Grunge.

    Screenshot to follow.

    • This reply was modified 11 years, 2 months ago by websitegurus.
    #176333
    This reply has been marked as private.
    #176483

    This is cut and paste of my post below from this thread here:
    https://kriesi.at/support/topic/can-i-remove-the-menu-from-just-one-page-using-css/#post-176479

    ============

    I have the same exact questions asked about six or seven hours ago and have no input.

    https://kriesi.at/support/topic/remove-top-nav-menu-selected-pages/

    This seems like a pretty basic thing to do on a website. I want a landing page with a boxed layout and NO menu at the top and I’ve had to jump through serious hoops to get it going. I am working with your default demo site and data and haven’t added a thing to the databases with respect to custom content for the test page.

    I’ve got it working using if/else conditional statements in the header file using if ( is_page( 2345 ) )
    The menu is now gone, but the CSS is still writing an empty block (without href links). The block is the exact same pixel dimensions as if $nav
    is still being echoed. So somewhere a CSS property is still affecting the Div that held $nav.. It’s either that, or some padding-top or margin-top is
    being written to a wrapper Div or an adjacent DIV just below where $nav would reside in the header. If you read my other thread, you will
    see a screen shot where the background CSS Properties disappears. Probably because #wrap-all fills the screen width at 100%.

    Manual edits to the CSS were necessary to make the background spring to life again for both the boxed and unboxed layouts as follows:

    #ls-global.html_boxed
    {
    background: #000000 url(http://localhost/enfoldtest/wp-content/uploads/2013/04/asphalt_background_spotlight_upper_left_01.jpg) no-repeat fixed top center;
    }
    HTML.html_boxed
    {
    background: #000000 url(http://localhost/enfoldtest/wp-content/uploads/2013/04/asphalt_background_spotlight_upper_left_01.jpg) no-repeat fixed top center;
    }

    But I’m still left with the large empty white area where $nav would appear. Need to get rid of that.

    This sure is a major amount of hoops to jump through to remove $nav from a boxed layout so that you have a bonafide splash page or landing page without presenting a full blown menu to a first time site visitor. Sometimes you don’t want to sell the whole enchilada to a first time visitor. If you present too much information they may loose patience with the options, bail on your site and never call you for business. Sometimes less is more. And I haven’t even brought up the aspect of using small code blocks and HTML pages for presentation in popup light boxes. Things like registration forms, product detail popups and Ajax update forms for underlying pages. There are so many reasons why you wouldn’t want a menu to appear it’s silly.

    My intention was not to hijack this post, but it appears that my earlier post asking the exact same question with my three detailed posts with a screenshot was unanswered and skipped. Not even a salutation, or I’ll get back with you like you’ve done here. Every post around mine had a relatively polite reply except mine. Pretty odd. Meanwhile I’ve spent hours and hours hacking through your backend to see how it works for a pretty simple thing.

    Sorry mgma. I will post in my other thread and hopefully get an answer to what we are both trying to achieve.

    #176490
    This reply has been marked as private.
    #176656

    Hey!

    What kind of header are you using? You can add following code to Quick CSS and adjust it

    .fixed_header #main { padding-top: 0; }

    Cheers!
    Yigit

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Remove top nav menu selected pages’ is closed to new replies.