Hide widget headers
-
I know how to hide certain classes of widget titles (headers) like all rss widgets…
.heading .rsswidget {
display: none;
}But how does one hide ALL widget headers. I have hundreds of widgets and find the title useful for organization on the WP admin pages, but I don’t want them to be visible on the site itself.
The blog I need help with is: (visible only to logged in users)
-
Hello!
Have you look at the widget visibility? That might help you hide them. If not, it is located in customize from the “my site” button, and then under widgets.
Hopefully that helps you.
-
thanks, that works… now for those widgets where I want the heading to show, like the Se 7 Episode 5 Outline heading on the following page
https://game-of-thrones-episodes.com/2017/08/14/drogon-bonds-with-jon/
I can add a line of code with !important; but when I used show selector it didn’t look right so I used block, as follows… (is that okay?)
#text-184 h3, #text-220 h3, #text-178 h3, #text-167 h3, #text-136 h3, #text-226 h3 {
display: block !important;
font-size: 16pt;
background-color: black;
color: silver;
text-align: center;
width: 183px;
margin-left: -11px;
padding: 10px;
line-height: 1.2;
text-transform: initial;
font-weight: 100;
margin-top: -10px;
margin-bottom: 16px;
border-radius: 0;
} -
Yeah, you might not need the !important if you place that after the code I had given above.
-
good. I took it out. That’s probably best right?
Also, on that same page, if you go across the page to the right column under “What to expect” I have image widgets which are made visible on the pages according to tags, and I have adjusted their margins so there is no space between them. In order to do this, I have to add the following…
#media_image-223, #media_image-225, #media_image-227, #media_image-228, #media_image-229, #media_image-230, #media_image-231, #media_image-232, #media_image-233, #media_image-235, #media_image-276, #media_image-278, #media_image-327, #media_image-339, #media_image-367, #media_image-366 {
margin-top: -22px;
}There are other cases, as I continue to work on the site, in which I will be having a long string of items.
QUESTION: Is there any shorthand, or any other way, to get around this?
-
JUST NOTICED….
The code you gave me earlier works for all widgets EXCEPT for the middle column on the front page.
https://game-of-thrones-episodes.com/
You will notice the following titles: Featured video, Winter is coming recaps, original banner with boxes, feature article from the guardian, and the Guardian RSS.
-
See if this additional CSS does the trick. This is sort of a big hammer, but we are sort of slim on CSS selectors to use.
.widget h2 { display: none; } -
yea, THANKS, that worked. I should keep both of them then?
And did you read my other question of whether there is a way to shorten the css.
For example, something like: … #media_image-327-344, #media_image-360-370 ….
would be a lot easier than putting each individual id in.
-
Yeah, keep both.
There is a general CSS class on the media image widgets divs you can use like this.
.widget_media_image { margin-top: 22px; } -
I thought of that, but then all my media images would move up, and this is just something which is unique to the “What do you expect” widgets. I guess I will just have to do it longhand. Heck, I writing a tome anyhow in my CSS.
-
-
very good, thanks. I started a different threat about adusting a wikipedia table, and modifying the CSS. Hope you can look at that, please. (When you have a chance.) Thanks, again.
-
- The topic ‘Hide widget headers’ is closed to new replies.