Trying to remove footer from one or two pages only

Community Forums Forums Design Tips and Tricks Trying to remove footer from one or two pages only

This topic is: not resolved

This topic contains 10 replies, has 5 voices, and was last updated by  And_or 1 year, 11 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #9570

    mediacafeonline
    Participant
    Post count: 3

    I’m using the current version (Jan. 2013)  of Genesis and the Executive theme. I’m looking to remove the footer widget area from a few pages only – on the site.
    The support folks were kind enough to pass this along:

     
    To get you started, you can use code from here to remove the footer: http://my.studiopress.com/snippets/footer/#custom-footer
    remove_action( ‘genesis_footer’, ‘genesis_do_footer’ );
     In combination with some conditional tags: http://codex.wordpress.org/Conditional_Tags

    I’m getting a little bogged down here … any ideas

    #9576

    buddy_boy8403
    Participant
    Post count: 132

    What pages do you want the footer removed on?  Nick The Geek has a great tutorial on conditional tags here.  The conditional you are going to want to add to your footer logic in your functions.php file is:
    if(!is_page()) { ?>

    And then specify the page within the logic.

    #9585

    Brian Bourn
    Participant
    Post count: 98

    If you are trying to remove the footer widgets (not the footer) on only a few pages, another option would be to create a new page template and upload it to your theme folder to make it selectable from the page editor without having to track down the page IDs or edit your functions file every time.

     


    Bourn Creative | bourncreative.com | Twitter

    #9590

    mediacafeonline
    Participant
    Post count: 3

    WOW, @BrianBourn, that is so elegant … and late on a Friday, too!!!

    What would I have to add to make this functional?

    I added to Genesis folder, selected the “no footer” template – what loads is a completely blank page.

    #9605

    And_or
    Participant
    Post count: 42

    If its just for a few pages, why not simply hide the widgets with something like this in your css file:

    [css]
    <div class="cssRule cssEditableRule insertInto editGroup " role="presentation">
    <div class="cssHead focusRow " role="listitem">.postid-177 #footer-widgeted , .postid-178 #footer-widgeted{</div>
    <div class=" " role="group">
    <div class="cssPropertyListBox " role="listbox">
    <div class="cssProp focusRow editGroup " role="option">    display: none;</div>
    </div>
    </div>
    <div class=" editable insertBefore " role="presentation">}</div>
    <div class=" editable insertBefore " role="presentation">[/css]

    If you are on the page you want to have the widgets hidden on, you can check the body class to see which id you need to use.

    Not elegant, but efficient. But I will copy Briancreatives snippet for future use :-)


    Simplicity is not Simple Webtaurus

    #9659

    Brian Bourn
    Participant
    Post count: 98

    This file should go in your child theme folder “executive”. If you click the github link you can download the complete php file to add to your child theme. You shouldn’t ever edit or add anything to the “genesis” theme folder.


    Bourn Creative | bourncreative.com | Twitter

    #10173

    mediacafeonline
    Participant
    Post count: 3

    Brian,

    That did the trick.

    AWESOME!!!

     

    Brian

    #10175

    Bill Murray
    Participant
    Post count: 575

    @Brian – What’s the advantage of adding a custom body class? Just as a reminder that the footer widgets aren’t there by design?


    Web: https://wpperform.com or Twitter: @wpperform

    We do managed WordPress hosting.

    #10179

    mediacafeonline
    Participant
    Post count: 3

    I wanted to remove footer only on eCommerce pages both to secure the pages for the SSL, but also to keep the content focus of the page to be the transaction. Some of the footer elements, that change, include video and potentially other items that aren’t easily coded to serve up on http and https pages with the same html.

    #10197

    Brian Bourn
    Participant
    Post count: 98

    Bill-We add a custom body class on every custom template as things may shift around a little bit when removing elements and the template may need some targeted CSS tweaks. WordPress will usually add it’s own class that you can use but it is usually much longer than a custom class.


    Bourn Creative | bourncreative.com | Twitter

    #10220

    And_or
    Participant
    Post count: 42

    I just noticed I sent gibberish into my answer.. below is what it was supposed to look like. ( also to see if it works okay this time)

    [css]

    .postid-177 #footer-widgeted , .postid-178 #footer-widgeted {
    display: none;
    } [/css]

    I miss the preview that you could check before submitting on the old forum


    Simplicity is not Simple Webtaurus

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.