Did you know that the default wordpress tags, labels or keywords from the sidebar can have a huge impact on your website? Well it does.
Beginning with Version 2.8, the default tag limit in wordpress is set to 45, witch is quite large and can definitely affect PageRank on small blogs with less PageRank to spread around. However the net affect can still be helpful on high authority blogs.
How to limit the number of keywords in WordPress tag cloud to control PageRank
The taxonomy parameter was added so that any taxonomy could be used as the basis of generating the cloud. That means that a cloud for Categories or any other Custom Taxonomies can be presented to visitors.
1 |
wp_tag_cloud( $args ); |
The $args variable is a simple array as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
$args = array( 'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 45, 'format' => 'flat', 'separator' => \\"\n\\", 'orderby' => 'name', 'order' => 'ASC', 'exclude' => null, 'include' => null, 'topic_count_text_callback' => default_topic_count_text, 'link' => 'view', 'taxonomy' => 'post_tag', 'echo' => true, 'child_of' => null ); |
By default, the usage shows:
- smallest – The smallest tag (lowest count) is shown at size 8
- largest – The largest tag (highest count) is shown at size 22
- unit – Describes ‘pt’ (point) as the font-size unit for the smallest and largest values
- number – Displays at most 45 tags
- format – Displays the tags in flat (separated by whitespace) style
- separator – Displays whitespace between tags
- orderby – Order the tags by name
- order – Sort the tags in ASCENDING fashion
- exclude – Exclude no tags
- include – Include all tags
- topic_count_text_callback – Uses function default_topic_count_text
- link – view
- taxonomy – Use post tags for basis of cloud
- echo – echo the results
Another way to use is like in the next example:
1 |
wp_tag_cloud('smallest=15&largest=40&number=50&orderby=count'); |
So enjoy this and remember that maintaining a small outgoing links on your site maximize your webs site PageRank. And limiting the wordpress tag cloud can help a lot.
This is another simple function that does the trick:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
//Register tag cloud filter callback add_filter('widget_tag_cloud_args', 'tag_widget_limit'); //Limit number of tags inside widget function tag_widget_limit($args){ //Check if taxonomy option inside widget is set to tags if(isset($args['taxonomy']) && $args['taxonomy'] == 'post_tag'){ $args['number'] = 10; //Limit number of tags } return $args; } |