I am looking for custom CSS to add to my WordPress website to change the color of individual page titles. Does anyone know how to do this?

  • By just adding CSS and hard-coding post numbers in the CSS, or do you want this to be configurable per-post in the admin site?
    – Rup
    Commented Dec 11, 2020 at 12:16
  • Could you give an example of custom CSS for the title/h1 tag? this is what I tried but it didn't work: h1 { color: #fff; }
    – Troy789
    Commented Dec 14, 2020 at 11:11

1 Answer 1


Hide the default page title in the template and use a Gutenberg heading block instead. It should have a color control in the sidebar.

.page .entry-header {
    display: none;
  • Hi Martin, unfortunately I won't be bale to use the Gutenberg editor, It has to be done with custom css.
    – Troy789
    Commented Dec 14, 2020 at 11:13
  • On the most basic level, you can do this with the individual page ID's. If you inspect the page you'll see that the body tag has a few classes automatically added. Most themes will add something like .page-id-5 for a page with an ID of 5. Usually the home page and front page will also have .home or .blog respectively. Example: .page-id-5 .entry-title {color: #fff;} Commented Dec 15, 2020 at 4:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.