Hiding content from certain pages
-
Hi! I am using the Penscratch theme on my blog couchpilgrim.com, and I would like to remove the:
– Commentbox
– Site titel and Site tagline
– The menu bar – I already got help with that one, I am putting the css-code out here so that others can get this too:
.page-id-111 .main-navigation {
display: none;
}– Also I would like to know how to put an automatically updating [copyrightsymbol] couchpilgrim 2013-2015 in my footer. How do I do that?
Can someone help me with this?
If you want to take a look, you can look at this page:
http://www.couchpilgrim.com/example-page/The blog I need help with is: (visible only to logged in users)
-
Disable Comments (Commentbox):
Dashboard > Settings > Discussion > Default article settings. Uncheck Allow people to post comments on new articles.Site title & tagline:
Dashboard > Appearance > Customize > Site title & tagline. Uncheck Display Header Text. -
Yes, that would be if I wanted to remove them from ALL pages, but I only want to remove them on some pages.
I’m sorry that I forgot to mention this.
-
In each page bellow the editor there’s the Discussion box. Uncheck the Allow comments option.
-
Thank you very much, I found it now!
You don’t happen to know anything about how to remove the site title + tag line on just a few pages?
And how to make an automatically updating copyright in the footer? -
I don’t think it’s possible to remove the title & tagline in some pages/posts only.
About the footer you have to play around with your theme’s CSS…
-
@couchpilgrim what pages are you trying to hide it on? It is possible, but the amount of code involved really depends on the number of pages involved.
Also, for anyone landing on a page like that for the first time (maybe from a Google search?) it might be pretty confusing. Since you’re never sure how (or where) people first land on your site, it’s generally recommended to keep the header consistent across the site.
And how to make an automatically updating copyright in the footer?
What do you mean by automatically updating? While it’s not possible to remove the WordPress.com and theme credit that is there, you can add information to the footer using CSS.
It’s not possible to add a date (like the year) in a way that updates automatically, however. You would need to manually edit the CSS to update any text you add in this way.
-
-
As @fstat and staff-totoro told you, you would need a little bit of css magic to add (c) to your footer. You could try this code:
.site-info:before{ content:"your (c) here"; display:block; clear:both; }I hope this helps.
-
You don’t happen to know anything about how to remove the site title + tag line on just a few pages?
Sure – you can hide this info on specific pages by targetting the page’s body class. For example:
.page-id-467 .site-title, .page-id-467 .site-description, .page-id-305 .site-title, .page-id-305 .site-description { display: none; }You can also consolidate your existing custom CSS by combining your declarations using commas, like this:
.page-id-305 .main-navigation, .page-id-324 .main-navigation, .page-id-399 .main-navigation { display: none; }Repeat for as many declarations as you have.
If you simply want to hide the navigation everywhere, this will do the trick:
.main-navigation { display: none; }Let me know if you’re all set or if you still need further help with anything.
-
-
- The topic ‘Hiding content from certain pages’ is closed to new replies.