Skip to content

Changing H2 color

Solved WordPress
5 2 889 1
  • Hi sudonix,
    On our website, we have a class as shown in example:

    <div class="bs-blog-post list-blog">
    <article class="small col text-xs">
    <h2 class="title"><a href="https://sopriza.com/eating-live-monkey-brain-meals/">Eating live monkey brain meals</a></h2>
    

    We’re looking to change the color for h2 headings in bs-blog-post list-blog without affecting the h2 on widgets. What css should we use?

    Blog list can be found on frontpage.

  • Hi sudonix,
    On our website, we have a class as shown in example:

    <div class="bs-blog-post list-blog">
    <article class="small col text-xs">
    <h2 class="title"><a href="https://sopriza.com/eating-live-monkey-brain-meals/">Eating live monkey brain meals</a></h2>
    

    We’re looking to change the color for h2 headings in bs-blog-post list-blog without affecting the h2 on widgets. What css should we use?

    Blog list can be found on frontpage.

    @Sala Just checked your site. This should work

    .bs-blog-post .title, .bs-blog-post .title a {
        color: #ffffff;
    }
    

    It’s worth noting the existing CSS, which uses variables like the below

    color: var(--head-color);
    

    These come under the :root section as below

    :root {
        --head-color: #212121;
        --stext-color: #000;
        --text-color: #718096;
        --wtext-color: #fff;
        --bg-color: #fff;
        --box-color: #fff;
        --border-color: #e2e8f0;
        --wrap-color: #eff2f7;
    }
    

    You can easily override these by using the CSS I provided at the top of this post, or you can change the underlying colours defined in the variables. However, taking this route may mean other objects are styled in the same way, which may not be the desired result.

  • Hi sudonix,
    On our website, we have a class as shown in example:

    <div class="bs-blog-post list-blog">
    <article class="small col text-xs">
    <h2 class="title"><a href="https://sopriza.com/eating-live-monkey-brain-meals/">Eating live monkey brain meals</a></h2>
    

    We’re looking to change the color for h2 headings in bs-blog-post list-blog without affecting the h2 on widgets. What css should we use?

    Blog list can be found on frontpage.

    @Sala you could probably use

    .bs-blog-post h2
    
  • @Sala you could probably use

    .bs-blog-post h2
    

    @phenomlab i tried to use

    .bs-blog-post h2 {
    color: #fff;
    }
    

    But not yet taking effect. Could i be missing something?

  • @phenomlab i tried to use

    .bs-blog-post h2 {
    color: #fff;
    }
    

    But not yet taking effect. Could i be missing something?

    @Sala said in Changing H2 color:

    .bs-blog-post h2 {
    color: #fff;
    }

    Try

    .bs-blog-post h2 {
    color: #fff !important;
    }
    
  • Hi sudonix,
    On our website, we have a class as shown in example:

    <div class="bs-blog-post list-blog">
    <article class="small col text-xs">
    <h2 class="title"><a href="https://sopriza.com/eating-live-monkey-brain-meals/">Eating live monkey brain meals</a></h2>
    

    We’re looking to change the color for h2 headings in bs-blog-post list-blog without affecting the h2 on widgets. What css should we use?

    Blog list can be found on frontpage.

    @Sala Just checked your site. This should work

    .bs-blog-post .title, .bs-blog-post .title a {
        color: #ffffff;
    }
    

    It’s worth noting the existing CSS, which uses variables like the below

    color: var(--head-color);
    

    These come under the :root section as below

    :root {
        --head-color: #212121;
        --stext-color: #000;
        --text-color: #718096;
        --wtext-color: #fff;
        --bg-color: #fff;
        --box-color: #fff;
        --border-color: #e2e8f0;
        --wrap-color: #eff2f7;
    }
    

    You can easily override these by using the CSS I provided at the top of this post, or you can change the underlying colours defined in the variables. However, taking this route may mean other objects are styled in the same way, which may not be the desired result.


Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics
  • configure ghost and wordpress combo

    Moved Solved WordPress ghost wordpress nginx
    9
    7 Votes
    9 Posts
    2k Views
    @Madchatthew I’d always post for the reasons I stated above. It’s useful information and could save someone else the headache.
  • 14 Votes
    17 Posts
    2k Views
    No problem dude ! I hope you have a good vacation. Enjoy your loved ones!
  • Hidden border

    Solved WordPress style
    17
    1 Votes
    17 Posts
    2k Views
    @Sala yes please.
  • Help us fixing the H1 header tags

    Solved WordPress html h1 tags
    12
    6 Votes
    12 Posts
    2k Views
    @Sala I’ve spent some time this morning reviewing your WordPress configuration. The issue of the duplicated h1 tag is being caused by AnsPress - you’ll no doubt recall I warned against using this “plugin” (if you can call it that - it’s terrible) here https://sudonix.com/topic/358/fresher-in-nodebb-install/6?_=1674640646763 AnsPress is well-known in WordPress circles for being one of those plugins you’d avoid at all costs. I used it once - never again. It causes far too many issues, and provided you don’t mind your site suffering as a result in terms of performance, bugs, and the like, then ok. In relation to SEO, see the below https://anspress.net/questions/question/seo-issues/ This was reported in October 2022, and it’s still not fixed. From my own independent review, I also see the following issues [image: 1674648697142-81a553b7-acac-43ab-baeb-13d956c41d5f-image.png] The most damaging of these is content being served on both non-www and www URLS, which needs to be fixed ASAP. You’ll note that the h1 heading appears twice (which you’re already aware of) [image: 1674648806743-8065709b-6664-4a50-9cd4-2ca1e9dbe756-image.png] However, aside from SEO, I see far more important issues that you need to resolve first TTFB (Time to First Byte) - the page is incredibly slow to load - in some cases, it takes 2-3 seconds before any content is shown. This is a killer in itself as more than one second loading time is considered far too high. 301 redirects are missing - in this case, you should have a global redirect so that the content is being served from the same domain at all times. The bottom line here, and the “fix” is to remove AnsPress. Clearly, this isn’t palatable from your perspective as there is significant investment on your side. I know from previous discussions that AnsPress was shipped with the theme you are using, but it’s a below-par plugin in terms of performance and stability. You’ll see below my attempts to get AnsPress working as far back as 2017 - I promptly gave up, because it was such a mess https://theme.co/forum/t/anspress-plugin-with-x-pro-integrity-stack/14015 And finally, one very well respected WordPress resource (wpcrafter.com) parted ways with AnsPress in 2018 for similar reasons, which he clearly stated https://anspress.net/questions/question/very-serious-issue-with-upgrade-to-v4-1-9-multiple-emails-being-sent-out-to-everyone/ [image: 1674650179187-262370bb-7d2b-499e-9d89-fac759b1e42d-image.png] At this point, I would weigh up the investment in AnsPress and seriously consider removing it.
  • Recent Cards Plugin

    Solved Configure customisation
    5
    1
    4 Votes
    5 Posts
    907 Views
    @crazycells that’s a good point. Thanks
  • Viewing Permission.

    Solved General support customisation
    33
    12 Votes
    33 Posts
    6k Views
    @phenomlab Ah Mark you are a star. Thank you very much. I just logged on and seen someone had worked their magic Again it is very much appreciated.
  • 9 Votes
    32 Posts
    8k Views
    @DownPW said in Bottom footer navbar button extend: Oh my god, it’s beautiful mark I liked this design so much, I’ve implemented it here. I intend to do a lot more with the footer in due course, so hiding it makes a lot of sense. Thanks @DownPW for the idea and initial concept
  • move out from flarum to wordpress

    WordPress wordpress flarum migration
    87
    52 Votes
    87 Posts
    21k Views
    @Hari Glad to see this went so well, and that you’ve finally departed the Flarum ecosystem