How to Hide Site Titles for Blog Posts
-
Hi,
I’ve used the following CSS to hide my site-titles throughout my website https://wordpress.com/view/gpbellbooks.com:
.page .site-title {
display: none;
}This worked but now I’m trying to figure out how to do the same for my Blog posts. I tried the following CSS but it did not work:
.post .site-title {
display: none;
}Here is an example of a blog post where I want to hide the site title “G.P. Bell | Children’s Book Author”:
Thanks.
The blog I need help with is: (visible only to logged in users)
-
Change your code to just:
.site-title { display: none; }Adding the
.pagelimits the code to just PAGEs, which blog POSTs, category archives, monthly archives, etc, are not. -
Hello – just wondering why the following CSS (per gpbellauthor above) doesn’t work? I’m trying to remove my site-titles from blogs only!
.post .site-title {
display: none;
}Thanks
-
Just adding this explainer here because I can’t edit my posts:
.post .site-title {
display: none;
}That’s thinking logically, but most things in WordPress are anything but :-D
If you wanted to hide the headline for individual blog POSTs (as you did for PAGEs), you’d use:
.single .site-titleinstead :-)But that would still leave out a lot of pages that are neither WordPress PAGEs or POSTs: like category/tag/date archive pages, search result pages, et. Using just
.site-titlewill let the code work for the entire site. -
-
You’re awesome! Thank you @georgeappiah! You’ve freed my mind…now I can fully enjoy my daughter’s b’day! :)
- The topic ‘How to Hide Site Titles for Blog Posts’ is closed to new replies.