I want a page to view only a specific post format (e.g. aside).
Do I have to create my own page and run a custom query, or does WordPress have an automatic page generated for me (like the categories)?
2 Answers
Take a look at get_post_format_link()
Here’s a little example that uses get_post_format_link()
to show a link to the format’s archive page. You can see something similar to this in action on Justin Tadlock’s site.
function get_post_format_archive_link() {
return sprintf(
'<a class="post-format-archive-link %1$s" href="https://wordpress.stackexchange.com/questions/39925/%2$s">%1$s</a>',
get_post_format(),
get_post_format_link( get_post_format() )
);
}
usage:
echo get_post_format_archive_link();
The URL Structure is:
/type/{post format}/
So for an aside we’d have:
http://example.com/type/aside/