Skip to main content

How to get random Tags of WordPress?

To get the random tags of WordPress you just need to make a function like below and save it in your themes/child-themes functions.php file.
Have a look of below code--

function random_tag_abhinesh(){ $a=get_the_title(); //search the tag by the order of first letter of page title ex- page title is A then the tags which is started from letter A
 $a = strtolower($a);
   $tags = get_tags(array(
  'hide_empty' => false,
    'orderby' =>'count'
  foreach ($tags as $tag ) {
 if(strtolower(substr($tag->name,0,1)) !=$a){
<a class="link-of-tag" href="<?php echo get_tag_link( $tag->term_id ) ?>">
<div class="name-of-tag"><?php echo $tag->name ?></div></a>


Popular posts from this blog

Page Speed Optimization Vipr Vivah

What the best can someone achieve to speedup the website.Now a days, A website must be optimize for it's speed and for the SEO which is stands for Search Engine Optimization. It need the best practices to speedup the website. Google follow strict rules to provide the score to any website if a green signal you achieve it means you worked hard. Let us optimize your website for best result.

World Quotations .Com

Header- World Quotations.Com By Abhinesh Tripathi Main Content Area-- World Quotations.Com By Abhinesh Tripathi Footer -- World Quotations.Com By Abhinesh Tripathi Technology/CMS WordPress Website Link Client Private Awarded At Upwork Specification Custom Child Theme based website.