I need to get post popular tags. Here what I found from https://codex.wordpress.org/Function_Reference/wp_tag_cloud
$tag = wp_tag_cloud( 'smallest=8&largest=22&number=2&orderby=count&format=array' );
Here is an example from Wordpress site:
Cloud displayed under Popular Tags title
<?php if ( function_exists( 'wp_tag_cloud' ) ) : ?>
<h2>Popular Tags</h2>
<ul>
<li><?php wp_tag_cloud( 'smallest=8&largest=22' ); ?></li>
</ul>
<?php endif; ?>
I did not understand this parameters meaning smallest=8&largest=22 and does this example what I need?
smallest
andlargest
are maximum font size that a tag can have based on it's popularity (usage). The largest tag in output on website means most popular tag. And yes, it will work. Use it and you will know. – Robert hue Oct 6 '15 at 6:03post tags
not popular posts. – Robert hue Oct 6 '15 at 6:59