• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Trying to remove footer from one or two pages only

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

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

This topic is: not resolved

Tagged: conditional tags, css, footer, genesis_do_footer, genesis_footer

  • This topic has 10 replies, 5 voices, and was last updated 10 years ago by And_or.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • January 4, 2013 at 3:13 pm #9570
    mediacafeonline
    Member

    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

    January 4, 2013 at 3:28 pm #9576
    buddy_boy8403
    Member

    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.

    January 4, 2013 at 3:47 pm #9585
    Brian Bourn
    Member

    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

    January 4, 2013 at 4:10 pm #9590
    mediacafeonline
    Member

    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.

    January 4, 2013 at 5:52 pm #9605
    And_or
    Participant

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

    <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">

    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

    January 4, 2013 at 8:06 pm #9659
    Brian Bourn
    Member

    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

    January 7, 2013 at 2:35 pm #10173
    mediacafeonline
    Member

    Brian,

    That did the trick.

    AWESOME!!!

     

    Brian

    January 7, 2013 at 2:40 pm #10175
    Bill Murray
    Member

    @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.

    January 7, 2013 at 2:47 pm #10179
    mediacafeonline
    Member

    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.

    January 7, 2013 at 4:02 pm #10197
    Brian Bourn
    Member

    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

    January 7, 2013 at 5:57 pm #10220
    And_or
    Participant

    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)

    .postid-177 #footer-widgeted , .postid-178 #footer-widgeted {
     display: none;
    }  

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


    Simplicity is not Simple Webtaurus

  • Author
    Posts
Viewing 11 posts - 1 through 11 (of 11 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble