I would like to change the color of the title's in my posts.
-
-
Okay, before you kill me … Is there a way to just “highlight” a singular post and not have ALL OF THEM red?
Yep, that’s what I mentioned earlier:
If you want to target a particular post title, you need to add the post ID in front of it. For example, this will target your newest post only:
.post-22640 .entry-title, .post-22640 .entry-title a, .post-xxxxxx .entry-title, .post-xxxxxx .entry-title a { color: #bb00bb; }You can get the post ID by looking at the number in the browser’s address bar when you’re editing the post in the WP Admin editor, or by viewing the browser source when you’re looking at the post and finding the body tag. For example:
http://boxcarokie.com/2015/06/17/pretend-campers-2/
If you view the browser source, you’ll see:
<body class="single single-post postid-22688 single-format-standard logged-in admin-bar no-customize-support mp6 typekit-enabled customizer-styles-applied theme-menu-maximized highlander-enabled highlander-light">You’ll find that particular page’s post ID there: postid-22688
Here’s how to view the browser source in four different browsers:
http://www.wikihow.com/View-Source-Code
You’ll need to repeat this part for each page whose title colour you want to change:
.post-xxxxxx .entry-title, .post-xxxxxx .entry-title aBe sure to replace the xxxxxx with the post ID, and separate each set with a comma, as in my example above.
-
First off, right out of the chute. You people are great. No bones about it. I want to thank all of you for your input and your help in this matter. You are definitely top drawer.”
I have tried it all, one way or the other, without any noticeable success. I did at one point manage to change ALL OF MY POST TITLES to red, but that was not my goal. No matter what it is that I put in that CSS dialogue box, it is no soap. Just wanted to change one post every now and then to a different color or make perhaps a template, but it is not happening.
I now leave it to all of you, who are better at it than me, just aint gonna happen.
Please excuse me now, as I am going back into the kitchen and put my head in the oven.
Thanks,
LDS
Boxcarokie.com -
Hi @ldsrr91
If I can jump in here for a second (yes, I have been following along from home!) I think the fact that you want to change the color of your titles only occasionally that is going to be the big issue for you here.
What I mean is, we can help you change all your font colors (sounds like that was a success at least!) but if you only want to do it for the occasional post, you’re going to need to get comfortable with rolling up your sleeves, and changing the CSS code every time you want to do that. This will involve looking up the POST ID and manually adding it to your red font style, just as @kathrynwp has described.
So essentially, If you’re not comfortable with editing your own CSS, this may not be the best idea for your blog… :(
-
I could not agree with you more. I am uncomfortable as hell with all of it. Was hoping for a piece of code or maybe a template to use occasionally, but that isn’t working for any of us.
Looking it up is one thing, knowing what to do with it, is another.
Thanks for your reply.
LDS
-
Hi again,
Well, just thinking about it gave me an idea. This is a two-part solution, so bear with me. First, here is a bit of CSS code you can try:
.format-aside .entry-title { color: #F00; }Just click on the CSS tab of your site customizer here, and copy-and-paste the above code: https://wordpress.com/customize
Be sure to save your changes when you are done, of course.
—
Now for part 2. By itself, the above code does nothing… it only works if you trigger it. In this case, the trigger is the “Aside” post format, something you can set any time you like from the post editor.
In your post editor, you will see that setting below your tags and categories.
Here is a screenshot of what that looks like: https://cloudup.com/ckDz5ZISx1i
The “Aside” format is not selected by default, so if you publish a blog post, it will have a blue title. But if you select the “Aside” format, it will have a red title. That is the trigger. :)
You can try this by editing any of your current blog posts, to make it an “Aside” instead of a “Standard” post. You can also do it for any upcoming posts you make. Just remember to set the “Aside” type if you want to have a red title.
Hope that helps!
-
Such a tricky animal, this CSS thing. I took your suggestions to heart Jerry and did it “exactly” as you suggested.
Took the code/script, copied it, inserted it into the customizer and then saved/published.
Found the first post on the page. Updated/Changed it from standard post to aside. Again, the end result did not produce what it is that I want.
I do appreciate your input, seemed like it would do the trick, but it did not. Thanks.
LDS
-
Hi again,
Sorry about that. I spotted something wrong with the code I gave, plus also when you copied the original one, you had a few extra characters… so I went in there and touched it up, and… IT WORKS! :)
You can see your test post now has a red title.
For those following at home, here is the change I made to the code:
.format-aside .entry-title a { color: #F00; }Cheers!
-
I just do not get it. I actually see where it works for you, and I check the customizer and see the code.
Then I draft test one with regular script and all … works just fine.
Then I draft another with test II and select the aside button, and I get no change whatsoever.For the life of me, I cannot figure out why it is working just fine for you, but not for me. Am I doing something wrong here Jerry?
-
BINGO! STOP THE PRESSES … NO MORE PHONE CALLS, WE HAVE A WINNER.
I hit the “home button” and then I saw the change. That was the problem.
I really want to, once again express my gratitude for all your help you guys. Thanks again.
Don Smith
-
Once again, thanks folks for all the help, and especially your patience. That says a great deal for you right there. I can now accomplish my goal (however insignificant it might seem) and do a few things I have desired to do.
Could have not done it with you.
I would like to extend to you an invitation to visit Creative Endeavors, and comment on anything and everything if you so desire. If you see something you think might help it along, we would welcome your input.
Best regards …. Thanks
Don Smith
Boxcarokie.com -
- The topic ‘I would like to change the color of the title's in my posts.’ is closed to new replies.