• Hello!
    I’m not completely new to WordPress and kind of know my way around, but I’ve encountered an issue that I can’t figure out. I’m creating a website using the Prospect Theme, and all I want to do is change the color of one word in a post. Now here’s where it gets “tricky.” The website is for an artist, and she wants the paintings that are sold to display “sold” in red in the description. Now when I change the “sold” in the post to red it shows up just fine, however, when I view the thumbnail with its description on the portfolio page, the “sold” is the same color as the rest of the text. This theme uses custom post types to display the thumbnails on the portfolio page if that’s of any help. I’m stumped at this point. Any help would be greatly appreciated. Here’s a link to the page I’m talking about.

    https://www.pattyramey.com/test/?page_id=12

Viewing 6 replies - 1 through 6 (of 6 total)
  • How are you adding the inline CSS to the regular posts? Is it not possible to do that on the gallery page?

    If not, I’m not sure you can do what you want without some recoding of the theme – and that looks like a commercial theme?

    Thread Starter nvictory

    (@nvictory)

    Thanks for your quick response! For the regular posts, I’m just using the visual editor and that seems to work for the posts just fine. That doesn’t seem to be a possibility on the gallery page.

    I’m not sure where to begin with recoding anything on this theme. It was a free theme I downloaded from wpbusinessbundle.com. Any suggestions?

    Thanks!

    Since that’s a commercial provider, I’d suggest you contact them for support in the first instance. We only support themes downloaded from www.ads-software.com here.

    EDIT – was writing this and didn’t see esmi’s post until now – and she’s right (of course ?? ), but in case this is still useful, I’ll leave it here:

    Unfortunately, impossible to say without looking at it and these forums only support the themes from the repository on this site. You’d have to look at how those gallery pages are being created – are they part of the theme or a plugin?

    You can use CSS to get that whole line:

    #gallery-four-boxes p {
       color: red;
    }

    but the “sold” has no way to target it separately…

    <p>11″ X 14″ | Acrylic on Canvas | Sold</p>

    But here’s another idea which might work – instead of using “sold” you could use CSS to add a graphic that says “sold” – see:

    https://www.w3schools.com/cssref/sel_after.asp

    So the CSS above could be modified to:

    #gallery-four-boxes p:after {
       content:url(image here);
    }

    You’d probably have to another CSS declaration for the regular post page…and test it widely to be sure it works everywhere you need it to and doesn’t mess up anything else…

    Best guess – this is a custom page template that ships with the theme. So you’d need to look at that template file and see how/where it grabs the “sold” information within the Loop and surround that piece of code with a new custom class. You will then be able to style the class according to your needs – either by changing the text color or doing an CSS image replacement.

    But without access to the theme, there’s nothing we can provide in the way of specifics.

    Thread Starter nvictory

    (@nvictory)

    Thanks for all of your help! I’ll give it a try and see if I can get it to work.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Change Color of a Single Word in a Post’ is closed to new replies.