Add category, tag and time data to your WordPress post template
Adding categories, tags and the time a post was posted is all useful stuff to know. Here’s how it’s done…
1 |
<?php the_tags('<div class="tags">Tags: ', ', ', '</div>'); ?> |
Returns: Tags: Apples, Pears, Bananas (if you have Apples, Pears and Bananas as tags!!!)
1 |
<?php the_category(', '); ?> |
Returns: Tags: Fruit, Vegetables, Meat
1 |
<?php the_time('jS M Y'); ?> |
Returns: 1st Mar 2014
More information and how to extend these further can be found at WordPress: the_tags, the_category, the_time and PHP Date