This plugin will add a custom “colors” tags to your posts.
It will be very useful for e-commerce blog which selling clothes or for designs blogs writers who wants to set one or more colors for each posts.
It will add a new column in the admin posts listing page to show the colors tags used for each posts.
It will come with a customizable widget which allow you show colored bulls in your sidebar. You can also add a php code to display colors tags like classics tags. See
FAQ section for more details.
- How can I add/edit or remove colors
The managing system is the same as
tags. Go to
Postssection. Add a color with a color
Descriptionis not used.
- How can I assigned a color to a post
When you are writting a post, go to the right column under
tagssection and add or remove the colors you want.
- How can I change the color for the widget
Go to the
Hold your colorsettings page under
Settingssection. Then, for each color, paste the hexadecimal code in the input field or use the jQuery colorpicker.
Save your changes.
- Can I use a tag cloud for the colors
Yes, set a new
Tag Cloudwidget and set
Colorsfor the taxonomy.
- What are the colors widget options
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
- How can I show colors tags in the loop
The plugin comes with two useful functions.
<?php the_colors($bull = true, $before = null, $separator = ' ', $after = null); ?>
$bull: show colors as bullet and not as word
$before: text to show before listing
$separator: separator between each color
$after: 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 :
It will return an object array. Refer to this function to see who to use id : https://codex.wordpress.org/Function_Reference/wp_get_post_terms
- How can I print colors of a specific post outside the loop
Use the second function see below and set the
- How can I change the style of the widget/inside post listing
Just edit the
cssfolder of the plugin.