[Resolved] Widget Title
Thanks for this useful plugin. I have an issue with the widget title that appear with h1 tag.
I want to replace that with h2 tag. It’s possible to do that?
@fastfreddie. Glad the plugin’s useful!
I assume you mean the Page title in the widget (i.e. the title of the featured page) and not the “Widget Title” field from the plugin?
If it’s the Page title, then right now, there’s not an easy way to change that, though I can see how I might be able to tweak it in the future. I’ve got a plugin update that’s almost out the door, but I’ll think through whether to make a tweak to allow for that.
Can you confirm that it’s the page title you’re wanting to change? Also, if you could briefly tell me why you’re wanting to change it to an h2, that could help me determine the best way to implement something like this.
I thought of posting a new topic but this is exactly what I was looking for as well so I shall post here.
I want to change it to a h2 as well, or even a different tag because the length of my ‘feature page’ is quite long and it breaks over a couple of lines in the side bar – which kind of looks ugly.
I was looking at your code to try and reduce the font size but didn’t get anywhere. Is there a quick way for me to edit the Post Title CSS?
In the feature-a-page-widget/css/fpw_styles.css I found this:
/* a friendly font size suggestions */
However, changing the font-size here didn’t do anything.
You highlight the two ways you could go at this problem. the first would be to change the underlying markup, and the second is to change the styling.
The widget uses the HTML5 document outline best practices, though it’s not perfectly supported by all the devices that should right now. However, it’s probably here to stay. If you want to change the markup, you’ll need to override the widget’s markup template as described on the FAQ page.
You found the right selector
.fpw-page-title, but, as the comment suggests, it won’t always be picked up. That’s because it has a low CSS specificity. When in doubt, I think the theme should be handling the styles. If you’re using that selector then, you’ll need to either:
- Make it more specific with some additional classes or IDs
- Use the
!importantkeyword with your selector.
A lot of people say to never use the !important keyword, but in isolated cases where you may be battling something with an unreasonable specificity, I think it’s the way to go.
Either way, make sure you use a child theme to override your theme styles! Good luck.
is there a way to remove the page title, leaving only the image as the link to that page?
- The topic ‘[Resolved] Widget Title’ is closed to new replies.