The title in my WordPress is of two words (say “The Company” for example). Right now the default color is Blue. But I want the “The” portion in the above example to be Grey. I used the font tag and set it as <font color="grey">The</font> Company
in the site title Input box. In the preview page it is showing correctly, but when I visit my page , it is showing as
<font color="grey">The</font> Company
including the tags. How to modify? I’m using mindfulness theme in WordPress
(similar kind of) if someone throws a light on option two of this page.
A briefly describing image:
How to target specific words in the blog title of the Twenty Twelve theme?
You can try the following, it works for the Twenty Twelve theme:
where we use the
bloginfo
filter to target only the second instance of the blog name, counted from the<body>
tag.Then we can target the span tag with CSS:
Example:
Here’s a screenshot:
It should be possible to adjust our code snippet to other themes as well.
I hope this helps.
To do so you have to change the style.css that controls your design | theme.
Edit CSS from wordpress:
Login to WordPress, not sure which version you’re running, but you should have a section called Themes or Design. From there choose Theme Editor. There will be a list of all the files you can edit, the CSS stylesheet should be named style.css.
You will have to have write access in order to edit it from within WP admin.
Otherwise you will have to find the file via FTP on your website, download it to your computer, edit it, and then upload it back to your site.
Edit CSS the way you want it:
There is also a fiddle for you to test it:
JSFIDDLE Demo
GoodLuck!