Edit a single page only


Is it possible to use CSS to edit a single page only?

I would like to change the colour of page-title on one page. This is my attempt:
.post-id-54 .h1.page-title {
color: #aa0000;

I have tried both .post-id and .page-id without any success. Does anyone know how to do this?

Many thanks,

There’s a plugin I use that will resolve your problem and be a great addition to your site overall.

I’m not sure if posting link on here is cool or not, so just search the WP plugin directory for “WP Add Custom CSS” and install that.

It will add a custom css box on the edit post page for every page/post on your site (similar to the site-wide custom css box that Sparkling comes with), allowing you to add code to each page individually.

Thanks, but it didn’t work for me… for some reason.

Come to think of it, I’d rather not use unfamiliar plugins for security reasons.

That’s strange, after installed you should be seeing a new “Custom CSS” box on the edit post page just below the slug and author sections.

Like you I’m a bit paranoid about security, so I install plugins manually and scan the code first to make sure everything is clean. Nothing to worry about with this one.

However, everyone’s plugin list is different so if this is just not working for you it might just be that you have a conflicting plugin that I don’t or perhaps a different version of WP itself. I do recall there being a few other plugins that serve this same purpose, but I chose this one and it worked great so I can’t vouch for any of the others.

Without using a plugin (or creating your own), I’m unaware of any other way you will achieve the desired result. Due to the way WP generates pages you can’t just hard code it in as the pages don’t exist as static files.


After looking at it some more, I think the problem is the ‘Woocommerce’ plugin is overriding the changes made in ‘WP Add Custom CSS’.

I guess this doesn’t have an easy solution. Although this problem isn’t ‘fixed’, I’m going to mark it as resolved because I can inelegantly work around it. Many thanks to krisbap for the help.

Hi @krisbap,

I hope you are well today and thanks for helping out here in this forum.

Your help here is really appreciated.