• 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

How to hide nav menu and footer on specific posts

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 › How to hide nav menu and footer on specific posts

This topic is: not resolved

Tagged: CSS selectors for custom post type, Custom Post Type, hide footer, hide nav

  • This topic has 4 replies, 2 voices, and was last updated 7 years, 12 months ago by Bruce Rawles.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • April 6, 2015 at 10:58 am #146822
    Bruce Rawles
    Participant

    I'm trying to figure out a simple general solution for hiding the navigation menu and footer on specific posts used for bulletins, so that I can use MailChimp's very cool feature:
    Campaigns > Selected a Template > Code Your Own > Import from URL
    which provides a superb solution for making an email template that matches the styling of a website and also provides online archives of past bulletins on the site for everyone to reference (including cumulative SEO benefits).

    I've used the "Genesis Simple Sidebars" (or just Layout Settings with the full width option for no sidebar at all) when I want to customize the sidebar for an email bulletin, so that works fine.

    I used the Custom Post Type UI plugin (version 1.0.5; https://github.com/WebDevStudios/custom-post-type-ui/ )
    and made a custom post type (Excerpt Bulletin), and this custom (excerpt_bulletin) post:
    http://whittierlegal.com/e-book-excerpt-1/
    ... now I just need to know how to hide the nav menu and footer on this custom post type.

    I'm thinking that if I could figure out how to style the correct elements, I would use:
    display: none
    in the CSS, but how do I reference nav and footer selectors for just this new custom post type in the CSS?

    THANKS in advance!!!

    http://whittierlegal.com/e-book-excerpt-1/
    April 6, 2015 at 11:07 am #146823
    emasai
    Participant

    Find the post id at the top of the source code and then write rules for all the posts where you want to hide the nav and footer.

    For example
    .postid-133 .nav-primary,
    .postid-133 .site-footer{
    display: none;
    }


    Need Website Customization or a Responsive CSS fix? Contact Me
    Lynne emasai.com

    April 6, 2015 at 12:15 pm #146835
    Bruce Rawles
    Participant

    Thanks, Lynne!!!

    Your code gave me just the clues I needed; I generalized (rather than having to tediously find the post-id every time I add a new post) by using

    .full-width-content .nav-primary,
    .full-width-content .footer-widgets,
    .full-width-content .site-footer{ /* added 6Apr2015 */
    display: none;
    }
    ... since I'm always wanting to hide these elements on full-width posts, and it looks perfect on the page. However, the footer (and widgets) don't show up in the MailChimp email as desired, but the nav still is...

    Any guesses as to why MailChimp still wants to show the nav even though the URL I give it for the "Import from URL" template doesn't show it?

    Thanks again! 🙂

    April 6, 2015 at 2:49 pm #146847
    emasai
    Participant

    Sorry I can't help you with Mail Chimp, you might need to contact their support.


    Need Website Customization or a Responsive CSS fix? Contact Me
    Lynne emasai.com

    April 6, 2015 at 9:22 pm #146868
    Bruce Rawles
    Participant

    Thanks, again, Lynne! I'll check with MailChimp support... MUCH appreciated! 🙂

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 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