Do you want to change the text selection color in WordPress? It’s easy!
Why Change the Text Selection Color?
The default text selection color is usually blue. It can be boring. A new color can make your site look better. It can match your brand colors. It can also make your site unique.
Step-by-Step Guide
Follow these steps to change the text selection color.
Step 1: Access Your WordPress Dashboard
First, log in to your WordPress dashboard. This is where you manage your site.
Step 2: Go To Appearance
Next, go to the “Appearance” section. You can find it on the left side of the dashboard.
Step 3: Click On Customize
Under Appearance, click on “Customize”. This will open the theme customizer.
Step 4: Open The Additional Css Tab
In the theme customizer, find the “Additional CSS” tab. Click on it. This is where you will add your custom code.
Step 5: Add The Css Code
Now, you need to add some CSS code. Copy and paste the following code:
::selection {
background-color: #FF6347; / Change this to your desired color /
color: #FFFFFF; / Change this to your desired text color /
}
This code changes the background color and text color when text is selected. You can change the color codes to match your site.
Step 6: Publish Your Changes
After adding the code, click on the “Publish” button. This will save your changes.

Credit: www.greengeeks.com
Understanding the CSS Code
Let’s break down the code you added:
CSS Selector | Description |
---|---|
::selection | This is the CSS selector for text selection. |
background-color | This changes the background color of selected text. |
color | This changes the text color of selected text. |
Choosing the Right Colors
Choosing the right colors is important. It should match your site’s theme. It should also be easy to read. Use a color contrast checker to make sure the text is readable. Here are some tips:
- Use a color wheel to find complementary colors.
- Avoid using colors that clash.
- Test the colors to make sure they look good on all devices.
Testing Your Changes
After changing the colors, test your site. Select some text to see the new colors. Check it on different devices and browsers.

Credit: www.wpbeginner.com
Reverting Back to Default
If you want to go back to the default color, it’s easy. Just remove the CSS code you added. Click “Publish” to save the changes.
Frequently Asked Questions
How Do I Change The Text Selection Color?
Go to the theme’s stylesheet. Add the CSS code for text selection color.
Where Can I Find The Css File?
Locate it in the Appearance section. Under the Editor, find style. css.
Is It Possible To Use Custom Colors?
Yes, use any HEX or RGB color codes. Apply them in the CSS code.
Will Changing Selection Color Affect Site Speed?
No, it is a small CSS change. It won’t affect your site’s performance.
Conclusion
Changing the text selection color in WordPress is simple. It can make your site look better. Follow the steps above to customize your site. Happy customizing!