WordPress.org

Ready to get started?Download WordPress

Forums

Feature A Page Widget
[resolved] Widget Title (6 posts)

  1. fastfreddie
    Member
    Posted 1 year ago #

    Hi

    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?

    Thanks

    http://wordpress.org/extend/plugins/feature-a-page-widget/

  2. mrwweb
    Member
    Plugin Author

    Posted 1 year ago #

    @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.

  3. howdoesoneblog
    Member
    Posted 1 year ago #

    Hey Mrwweb,

    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 */
    .fpw-page-title {
    font-size: 18px;
    margin-bottom: 10px;
    }

    However, changing the font-size here didn't do anything.

  4. mrwweb
    Member
    Plugin Author

    Posted 1 year ago #

    Hi @howdoesoneblog.

    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:

    1. Make it more specific with some additional classes or IDs
    2. Use the !important keyword 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.

  5. tobi1kanoby
    Member
    Posted 11 months ago #

    Hi Mrwweb,
    Great plugin.
    is there a way to remove the page title, leaving only the image as the link to that page?

  6. mrwweb
    Member
    Plugin Author

    Posted 11 months ago #

    Hi @tobi1kanoby. The answer is definitely yes. Please open a new support thread—this one is resolved and a different question—and I'll happily answer there.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic