How Do I Add a Color Block in WordPress?

Adding a color block to your WordPress blog is simple. First, open your wp-config.

php file and locate the line that defines your WordPress blog’s theme. Next, add the following line to that theme’s configuration:.

// Add a color block

define(‘BLOG_WIDGET_COLORS’, array(

‘primary’ => ‘#FF0000′,

‘secondary’ => ‘#0000FF’,

‘tertiary’ => ‘#FF00FF’

));

This line tells WordPress to include a color block in your blog’s Widget area. To add a color block, open the Widget area and locate the “Add New” widget.

Under the “Appearance” category, select “Widget Area” and then click on the “Add New” button. In the “Widget Area Configuration” section, select the “Color Blocks” tab and add the following block to your blog’s Widget area:.

{

“name”: “my-color-block”,

“type”: “colorblock”,

“settings”: {

“primary”: “#FF0000″,

“secondary”: “#0000FF”,

“tertiary”: “#FF00FF”

}

You’re done! Your color block will now appear in your blog’s Widget area. To style your color block, open the “Appearance” menu in your blog’s Dashboard and select “Widget Area” again. This time, under the “Widget Area Configuration” section, select the “Text” tab and enter the following code into your blog’s Widget area:

“type”: “textarea”,

“rows”: 10,

“columns”: 20,

“wrap”: true,

“text”: “This is my text area”,

“height”: 350,

“colors”: {

This will style your color block so that its text is in a different color each time it’s displayed. You’re now ready to start using your color block in your blog posts!.