I would like to list all post on one page, but I would like the posts to be grouped by tags. Is this possible in WordPress?
Basically this way:
Bikes:
Posted 2/8/2011
Some post title 1
Tag bikes
Posted 1/8/2011
Some post title 2
Tag bikes
Cars:
Posted 5/8/2011
Some post title 5
Tag cars
Posted 29/7/2011
Some post title 6
Tag cars
Boats:
Posted 30/7/2011
Some post title 4
Tag boats
Is this possible to do? It should dynamic so that I can create new tags from WP admin and they would show up automatically.
Loop though the tags using get_tags() and use get_posts with the ‘tag_in’ argument.
ie.
It depends. Are you trying to show posts for all tags, or just listing all posts by specific tags you’ve already decided on?
If you know the tags you want to display, here is how you would list posts by tag.
More info: http://codex.wordpress.org/Class_Reference/WP_Query#Tag_Parameters