I want to change the font size of my tags in the sidebar. My brother is legally blind and he can't see the smaller tags at all so I thought I'd make them a little bigger. I found this code to make the change but don't know where it goes. wp_tag_cloud('smallest=10&largest=16&number=45&orderby=name&format=flat'); Can someone tell me which file it goes in and it's position in that file? This is driving me crazy. So far, I've remembered to make copy of my files before I tinkered-- I've gotten some really strange errors with some very peculiar results. Thought I'd better get some help before I did something fatal thanks, kc
I believe that will need to go in your template where you want them to be shown. But be sure to include the php tags. <?php wp_tag_cloud('smallest=10&largest=16&number=45&orderby=name&format=flat'); ?> Code (markup):
Yeah, maybe your strange results were due to missing PHP tags ( <?php ?> ). Tag clouds can go anywhere but they usually go in the sidebar (sidebar.php) or footer (footer.php). To add a tag cloud to the sidebar of the default Kubrick theme, open themes\default\sidebar.php and place the cloud code between the other sections, like this: <?php wp_list_categories('show_count=1&title_li=<h2>Categories</h2>'); ?> <?php wp_tag_cloud('smallest=10&largest=16&number=45&orderby=name&format=flat'); ?> <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?> <?php wp_list_bookmarks(); ?> Code (markup): You can find out more about them here: Wordpress Template Tags - wp_tag_cloud
I dont think he was dropping it in the template files. If he were dropping it in the theme then the fact that he didnt have the php tags would just mean it would process as html. This wouldnt throw an error code.
Who knows? He doesn't mention error codes, just "errors" and "peculiar results" which can mean anything really.
Thanks for the help. The errors were syntax errors when I tried to drop the code in the sidebar.php. The last one was syntax error, unexpected T_ENDIF which I got rid of. And I was able to insert the code without any obvious errors. But my tag font size is still the same size -- tiny. Is there something else I need to do to get the tag font to change size? Thanks, Kay (aka kcvale)
The default font unit is points, so the smallest tags are 10-point which is very small. Try increasing the values of smallest and largest, like this: <?php wp_tag_cloud('smallest=16&largest=26&number=45&orderby=name&format=flat'); ?>
Right now, I have it on my local server while I work out the kinks. When I get it up and running I'll post back. Thanks for all the help.