How To Change The Background Color Of A Single Page In WordPress

Many WordPress website owners are more than happy to stick with the default background color of their pages.
There could, however, be a legitimate reason to change the background color of single pages on your WordPress website.
In this article, you will learn how to change the background color of a single page in WordPress.
Sign in to your WordPress dashboard, grab a coffee, and follow these steps.
Add A New Page To Your Site
Look to the left-hand side of your WordPress dashboard and create a brand new page.
Add some sample text to the page – a title and a sentence or two – and save it.
You can change the content later.
Select The Ideal Color For The New Page
When it comes to picking colors for your WordPress page, you’ve got plenty of options. We’ll be focusing on hex colors - short for hexadecimal.
There are millions of hex codes to choose from.
Type ‘hex color picker’ into Google search and you’ll find color wheels that will help you to find the exact shade of color you’re looking for.
Change The Background Color Of A Single Page In WordPress
Now, the fun begins...
From your WordPress dashboard, navigate to All Pages. Select your new page.
Each page has a unique ID number. Jot down the number next to the page= portion of the URL.
Next, navigate to the following:
Appearance > Customize > Additional CSS.
You need to add the following text to Additional CSS:
Body.page.page-id-00 {background-color: 111}
00 should be replaced by your page ID number. 111 needs to be replaced with the hex code for your color.
For instance, if my page is number 27 and I chose the hex code #FF0000 (the hex code for red), my code would look like this:
Body.page.page-id-27 {background-color: #FF0000}
This code needs to be inserted into Additional CSS.
Publish And Check Your Page
Once you’ve saved the page, this should now show the new background color on the page. The text on the page will still appear in its default style because you’ve only altered the background color.
We hope you now have a solid understanding of how to change the background color of a single page in WordPress. Diving into CSS and customizing a single page might feel daunting at first - but you’ll soon be able to do this with your eyes closed.
It’s worth noting that you need to access the WordPress dashboard as an administrator to change the background color of a page.