• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

WP Thinker

The WordPress Playground

  • Snippets
  • Best
  • Guides
  • Reviews
Home / Wordpress

October 22, 2018 Muhammed Swalih

How to Display A Tag Cloud Manually On WordPress

display-a-tag-cloud-manually-on-wordpress

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.

wordpress-tag-cloud-image

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;
}

Muhammed Swalih

A WordPress expert who has been tweaking WordPress functions, plugins, themes and almost everything related to WordPress for the past 5+ years.

Primary Sidebar

Related Articles

Footer

WP Thinker is a website that publishes everything related to WordPress, Plugins, Themes, SEO, Blogging, etc.

  • Facebook
  • Twitter
  • Pinterest

Copyright © 2023 · WP Thinker

  • About Us
  • Advertise
  • Write for Us
  • Privacy Policy
  • Terms and Conditions
  • Contact Us
This website uses cookies to serve you better. By continuing to use this website, you agree to our cookie and Privacy Policy.