How to Change WordPress Text Color for Beginners
Check Out More At: WP Beginner
WordPress: Best WordPress Plugins | WordPress Tutorials
How to Change WordPress Text Color for Beginners
Product Image | Product Name / Primary Rating / Price | Primary Button / Description |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Elementor is an amazing website builder plugin for WordPress. Elementor makes it easy to create beautiful and high converting websites yourself without having to learn code.
Gravity Forms is a WordPress plugin that creates powerful forms quickly and easily, with drag-and-drop fields, custom notifications and confirmations, and custom styling capability.
Kadence Theme is a powerful, intuitive and flexible WordPress theme that offers an expansive set of features and customization options.
It includes a robust page builder, beautiful design options, mobile-friendly responsiveness, powerful SEO tools and optimized performance for faster loading times.
It's perfect for creating stunning websites without needing to write any code.
Cloudways is a managed cloud hosting platform that simplifies cloud infrastructure deployment and management.
It provides an intuitive dashboard, automated backups and optimized stack for speedy performance. It also provides 24x7 support with multiple server locations, enabling businesses to host their applications quickly and securely.
One of the great things about WordPress is that you can easily change the text color of your site to match your brand or personal preference. In this article, we will show you how to change the text color in WordPress.
If you want to change the text color of your WordPress site, you need to understand how CSS works. CSS stands for Cascading Style Sheets and it is used to style the look of your website.
Every element on your website has what is known as a CSS selector. The selector is the part of the code that tells the web browser what element to style.
In WordPress, the body element is the main container for all of your site’s content. The body element has a CSS selector of body.
To change the text color of your WordPress site, you need to add a CSS rule to the body selector. The CSS rule you need to add is called color. The color CSS rule is used to change the color of text.
To add a CSS rule, you need to use the CSS property called style. The style property is used to add CSS rules to HTML elements.
In WordPress, you can add the style property to the body selector by using the WordPress function called add_action.
The add_action function allows you to add a CSS rule to an HTML element. The first parameter of the add_action function is the name of the HTML element. The second parameter is the CSS rule you want to add.
In this case, you need to use the name of the body element and the color CSS rule.
add_action( ‘body’, ‘color’, 10 );
The code above will add the color CSS rule to the body element. The number 10 is the priority of the rule. The higher the number, the higher the priority.
The color CSS rule has two values, the color name and the hex code. The color name is the name of the color you want to use. The hex code is the six-digit code that represents the color.
You can find the hex code of any color by using a color picker tool. A color picker tool is a web-based tool that allows you to select a color and see the hex code for that color.
Once you have the hex code for the color you want to use, you can add it to the color CSS rule.
color: #000000;
The code above will make the text on your WordPress site black. You can change the hex code to any color you want.
Once you have added the CSS rule to the body element, you need to save your changes and upload the file to your WordPress site.
You can do this by going to the WordPress admin area and clicking on the “Appearance” menu. Then, click on the “Editor” link.
On the left side of the page, you will see a list of files. Find the “style.css” file and click on it.
The “style.css” file will open in the editor. Find the code you added and make sure it is correct.
Then, click on the “Update File” button to save your changes.
Your WordPress site’s text color will now be changed.