Add custom color tag to your posts.
The managing system is the same as
tags. Go to
Colors under the
Posts section. Add a color with a color
Name and a
Description is not used.
When you are writting a post, go to the right column under
tags section and add or remove the colors you want.
Go to the
Hold your color settings page under
Settings section. Then, for each color, paste the hexadecimal code in the input field or use the jQuery colorpicker.
Save your changes.
Yes, set a new
Tag Cloud widget and set
Colors for the taxonomy.
Title: (optional) set a title to the widget Show as dropdown: change the presentation and use a dropdown list with the color name Hide empty: if checked, colors which aren't assigned to a post will be hidden Colors to show: check the colors you want to show. Prefer checking all
The plugin comes with two useful functions.
<?php the_colors($bull = true, $before = null, $separator = ' ', $after = null); ?>
show colors as bullet and not as word
text to show before listing
separator between each color
text to show after listing
If you don't want to show directly the colors and keep its in a php variable, use this function :
<?php get_the_colors($post_ID = null); ?>
It will return an object array. Refer to this function to see who to use id : http://codex.wordpress.org/Function_Reference/wp_get_post_terms
Use the second function see below and set the
Just edit the
hyc-widget.css in the
css folder of the plugin.