简体   繁体   中英

How to change color of h2, h3, h4 in WordPress post

I have tried to change color of header of WordPress post. But this is not work. I am using feather magazine themes for website .

.single_post .single-title {
    color: red;
}

should really only paint the post-title :)

You could go to or use the source-view of the post (when editing). Then find the <h1> <h2> or any heading element you want to change its color, then style it by eg: <h3 style="color: red;">Heading 3</h3> for example.

If you host or have access to your wordpress installation, you could find your theme's folder, find the css file(s) that is applied to your blog. I couldn't remember the exact path example anymore. There is usually only one style.css file under the theme's css folder. Once you located the style.css file that applies to your blog, add a style to change the heading colors eg:

h1, h2, h3, h4, h5, h6 {
    color: rgb(255,0,0); /* or use red as value */
}

or

<h1 class="differentcolor">Your classed heading</h1>

.differentcolor { color: red; } /* Your CSS */

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM