[wp-hackers] Re: [wp-svn] [5234] trunk/wp-includes: Tag clouds from mdawaffe.

Peter Westwood peter.westwood at ftwr.co.uk
Sun Apr 15 10:47:17 GMT 2007


spencerp wrote:
> Thanks Michael Adams for doing this! :D Ok, question is..  with this 
> below here:
> 
> +function wp_tag_cloud( $args = '' ) {
> +    $defaults = array(
> +        'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 45,
> +        'format' => 'flat', 'orderby' => 'name', 'order' => 'ASC',
> +        'exclude' => '', 'include' => ''
> +    );
> 
> I got my tag cloud on Vindictivebastard.net's index page using this:
> http://www.vindictivebastard.net/
> 
> <?php wp_tag_cloud(1, 100, '', ''); ?>
> 
> How can I get those sizes and such adjusted using the above line code? I 
> have my thoughts, but just want to ask the Pros about it lol... So, can 
> someone maybe provide an example code call that holds all the possible 
> various usages? Thanks in advance. :)
> 

wp_tag_cloud tags query string style parameters not an argument list so 
you need to call it like this:

<?php wp_tag_cloud('smallest=1&largest=100'); ?>

See the codex for more info on using query string parameters:
http://codex.wordpress.org/Template_Tags/How_to_Pass_Tag_Parameters#Tags_with_query-string-style_parameters

westi
-- 
Peter Westwood
http://blog.ftwr.co.uk


More information about the wp-hackers mailing list