Tag Cloud is a good way to implement the different categories or tags all over your website. Using these type of tag clouds placed on the sidebar of your website, users can reach the exact place which they are searching for. If you are a little geeky and want to create your own Tag cloud on the website. This guide on ‘How to display a tag cloud manually on WordPress’ might help you.
Create a Tag Cloud
To create or display a new tag cloud. Paste the below code to the functions.php file of your website. Read the WordPress.org Tag Cloud Reference if you need to know more about the tag clouds.
<?php wp_tag_cloud(array(
'smallest' => 8, // size of least used tag
'largest' => 22, // size of most used tag
'unit' => 'px', // unit for sizing the tags
'number' => 45, // displays at most 45 tags
'orderby' => 'name', // order tags alphabetically
'order' => 'ASC', // order tags by ascending order
'taxonomy' => 'post_tag' // you can even make tags for custom taxonomies
)); ?>
Style the Tag Cloud
Styling can be done in anyways as you wish, If you know all the basics of the CSS, you can easily tweak the look and feel of the tag cloud. The image shown below is such an example.
To get this design for the tag cloud, use the following CSS code.
.tagcloud a{
display:block;
float:left;
padding:4px 10px;
margin-right:7px;
margin-bottom:7px;
background:#EEE;
color:#666;
font-size:11px;
font-weight:bold;
text-transform:lowercase;
text-shadow:1px 1px 1px #FFF;
-webkit-border-radius:5px;
-moz-border-radius:5px;
border-radius:5px;
border:1px solid #CCC;
text-decoration:none;
}
.tagcloud a:hover{
background:#F3F3F3;
color:#000;
text-decoration:none;
}