Nov 12 2008
WordPress Categories and Tags
There seems to be differing opinions on how Categories and Tags should be used within WordPress. So now that I some experience with both of these I have decided to go with the following principles:
- I am using Categories as very high-level descriptors, like chapters in a book.
- I am using Tags as precise pointers, like the index in a book.
Consequently, the number of Tags is likely to grow very large, and it is likely that a substantial number of these Tags will only be used once. So I will keep this under review.
The Tag Cloud shows a maximum of 45 Tags by default, as described in the wp_tag_cloud()
documentation. However, this can easily be increased to any maximum number using a parameter.
I had expected that I could parametrise wp_tag_cloud()
as part of my theme, but I could not find any way to do this!
Instead I had to modify one of the WordPress PHP files. There appeared to be two approaches:
- Modify
wp_includes/category-template.php
as described in this WordPress Support thread. - Modify
wp-includes/widgets.php
as described in Modifying the WordPress Tag Cloud Widget Font Size. (Be careful of the incorrect apostrophe character!)
I am not sure what the relative advantages and disadvantages of these approaches are, but I chose the second one.
November 16th, 2008 at 04:54
Thanks for the link to my post about Modifying the WordPress Tag Cloud Widget Font Size. I didn’t realize all of my apostrophes where smart quotes when you copy and pasted. I found the culprit and will have a post up tomorrow about how to actually avoid having WordPress convert all your quotes to smart quotes. Take care. – c.bavota
November 16th, 2008 at 14:24
No problem. I look forward to reading your follow-up post regarding the auto converting of characters in WordPress.