Changing a span/div with CSS?

  • Unknown's avatar

    I need to change the wording on one part of our header, and I am maybe just weighed down with too much eggnog and can’t figure this one out.

    Here’s the code:
    <span class="trending-title">Trending Topics:</span>

    Basically they want to remove the word “Trending” and just keep Topics.

    Suggestions? Thanks!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi there,

    I don’t think it is possible to remove just one word from trending title using theme customizer or using custom CSS. However, one work around here is that you can move your trending title left in such a way that whatever comes before the word ‘Topics’ fall out from the site.

    Please try the below code under custom CSS to achieve it & let me know the results:

    .trending .topics {
    position: relative;
    left: -94px;}

    Please check all the pages & blog post on every device to confirm it is not impacting anything else.

    Please refer this support article for more details for Custom CSS: https://en.support.wordpress.com/custom-css/

    I’ve also added the ‘modlook’ to get some staff attention here to confirm things better.

    Hope this helps!

  • Unknown's avatar

    Hi gwenpearson62,

    Basically they want to remove the word “Trending” and just keep Topics.

    Can you send me a link to the post or page you are working on? I’ll have a look and see if that change will be possible.

    Thanks!

  • Unknown's avatar

    It’s a change to the theme; so would affect the entire https://entomologytoday.org/ site. The header/featured content area is where the “Trending Topics” appears.

    I’ve been able to make some CSS tweaks to colors and fonts easily, but this one is a bit of a problem.

  • Unknown's avatar

    Hey, now that the eggnog has cleared out of my head, I discovered there is a whole forum for Beacon:

    https://premium-themes.forums.wordpress.com/forum/beacon

    Alas, there is not a similar question there, although I have found out quite a bit about theme tweaking there.

    I tried tagging binarymoon, the theme author, here.

    It’s generally frowned upon to repeat post something in another forum section, Yes? I should not repost there?

    Thanks everyone :)

  • Unknown's avatar

    Hi gwenpearson62,

    Thanks for confirming, I can see what you mean now. Due to the way the heading is coded into the theme, it won’t be possible to remove just one word. That word would need to wrapped in a <span> with an ID or class in order for us to target it specifically. So you weren’t looking in the wrong place, it’s just a limitation of the theme :)

    It’s generally frowned upon to repeat post something in another forum section, Yes? I should not repost there?

    Beacon is a premium theme with a separate area on these forums. However, your plan also includes email and Live Chat support which you can access from this page:

    https://wordpress.com/help/contact

    I hope this helps.

  • Unknown's avatar

    But… it is in a span with a class?

    <span class="trending-title">Trending Topics:</span>

  • Unknown's avatar

    @gwenpearson62, what @gemmacevans was meaning is that the word “Trending” was not in a separate span tag. If it was, then we could easily get rid of it with custom CSS. What we have to do is a bit more involved and sometimes it doesn’t work for certain themes, but fortunately on Beacon I was able to do it. Add the following to your custom CSS and see what you think.

    .topics .trending-title {
      visibility: hidden;
    }
    .topics .trending-title:before {
      content: "Topics:";
      visibility: visible;
      background: url('https://entomologytoday.org/wp-content/themes/beacon/images/icon-trends.png') no-repeat scroll left center / contain;
      padding-left: 25px;
    }
    .topics a:first-of-type {
      margin-left: -90px
    }
  • Unknown's avatar

    Ah, thanks! I knew with that span there it ought to be tweakable….somehow :)

    I will work on this for the mobile theme too.
    Thanks for pointing me in the right direction.

  • Unknown's avatar

    You are welcome. Let us know if you have further questions or problems.

  • The topic ‘Changing a span/div with CSS?’ is closed to new replies.