What should I call the archive file for a post format? Ex archive-gallery.php? (doesn't work)
I would like to create a list of all the gallery formats with a preview and some custom taxonomies thrown in.
Well.... for querying, formats are a taxonomy parameter...so that should work.... http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters
Lemme loook...
And yep, here's how that works http://codex.wordpress.org/Template_Hierarchy#Custom_Taxonomies_display
taxonomy-post_format-post-format-link.php
You don't need to create a custom template for the archive index for Post Format types. Your existing template files (taxonomy.php
, archive.php
, or index.php
) will display them just fine.
Just use the following URL structure: www.example.com/type/{format}/
, which for galleries, would be www.example.com/type/gallery/
.
taxonomy_post_format-post-format-{type}.php
, which, for Galleries, would be taxonomy_post_format-post-format-gallery.php
. But, again: I think using such custom template files is overkill.
Commented
Jun 10, 2011 at 20:49