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.