Community Forums › Forums › Archived Forums › Design Tips and Tricks › How to hide nav menu and footer on specific posts
- This topic has 4 replies, 2 voices, and was last updated 9 years ago by Bruce Rawles.
-
AuthorPosts
-
April 6, 2015 at 10:58 am #146822Bruce RawlesParticipant
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 #146823emasaiParticipantFind 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.comApril 6, 2015 at 12:15 pm #146835Bruce RawlesParticipantThanks, 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 #146847emasaiParticipantSorry 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.comApril 6, 2015 at 9:22 pm #146868Bruce RawlesParticipantThanks, again, Lynne! I'll check with MailChimp support... MUCH appreciated! 🙂
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.