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/
Related Posts:
- Page template query with WP_Query
- How to display page content in a page template?
- How to query posts of standard post format. For real
- Single page theme that uses pages for the content
- Trying to list out child pages with WP_Query
- Order by menu structure
- Targeting specific pages in the loop
- What are the differences between “Latest Posts” and “Static Page”?
- WP_Query not retrieving by random order under parent
- Query different number of posts with different formats in one go
- Set if condition with wp_nav_menu
- How to query for posts without a post_format
- Set order of returned items in the WP_Query() class/function
- Search pages that are a child of the current page
- How to display summary content from a Page (Not a Post) on another page
- Serve specific “template” page at any URL that ends in its slug
- Display custom tags on pages that have a specific page parent
- How to exclude post formats from wordpress recent posts in a tabs widget [closed]
- Is there a reason why Pages are not publicly_queryable?
- Why post__not_in is ignored?
- Query only the posts with a post format of “audio”
- Exclude parent with child pages from WP_Query
- Create a loop on my pages with new “WP_Query”
- How to display all posts not in a post_format
- All blog data on a page using custom query gives 404 for page 2 and onward
- When listing child pages run out of memory
- WPQuery calling specific posts problem
- WP_Query with multiple orderby NOT working with ASC and DESC, what’s wrong?
- Display specific page (that is child) content on parent page
- Get query results with a page title
- Post archive for certain post format
- How to get current page nearest parent id?
- How to get main menu only with wp_nav_menu
- How to create Page templates for showing Blog posts in different layouts?
- Unable to paginate a custom page query
- How to create single page site in WordPress
- Determine if ID is page or post and query the ID
- How to query for a page, get data, then query for child pages of that page
- Get list of all Grandchild Pages
- Custom query does not find pages
- How to get pages of parent (non-recursive)?
- WP Query and multiple pages
- How to use custom page for all posts with custom url, call another directory?
- display the children of the post using the current page as the main parent
- pages shortcode filtering by category
- How to create page that lists tags by initial letter?
- Get a page ancestor from a most viewed list
- How can I use a specific wordpress page template if certain words are used in page title [closed]
- Category Archive not working for pages
- Retrieving category pages from subcategory returns empty sets
- Query posts in current category but not attachment format
- Issue in If else condition [closed]
- Show parent’s child and also child’s, child on a page?
- An archive page without post format (just standard post)
- get contents and permalink from a specified page
- Hierarchical List Pages as a table
- Get next post when using pagination with WP_Query?
- Exclude post formats in custom loop
- WordPress pagination returns the same posts
- How to query posts from single post format on Genesis framework
- How to write short code with if else to get page_id?
- Display post format post in the sidebar
- Rewrite URL custom search query
- Paginate_Links page 2 doesn’t work
- How to remove “MY WORDPRESS”” Label
- When should you use WP_Query vs query_posts() vs get_posts()?
- When to use WP_query(), query_posts() and pre_get_posts
- WP_Query by just the id?
- Meta_query compare operator explanation
- WP_Query with “post_title LIKE ‘something%'”?
- wp query to get child pages of current page
- How to get an array of post data from wp_query result?
- How to get post id of static front page?
- meta_query with meta values as serialize arrays
- How to only display posts whose meta_value field is not empty?
- Get post ids from WP_Query?
- Pagination when using wp_query?
- Exclude post ID from wp_query
- How to print the excuted sql right after its execution
- How to extend WP_Query to include custom table in query?
- How to store and receive variables in WP sessions?
- Should I use Pre Get Posts or WP_Query
- How can i retrieve default post per page value? from settings->reading. And total number of posts?
- Nested meta_query with multiple relation keys
- Is it necessary to use wp_reset_query() in a WP_Query call?
- Can I force WP_Query to return no results?
- Can wp_query return posts meta in a single request?
- Using pre_get_posts with WP_Query
- Find out total number of pages in global query on archive page?
- WP_Query + random
- Resetting post data to previous loop in nested loops
- order by numeric value for meta value
- numberposts? showposts? posts_per_page?
- $GLOBALS[‘wp_the_query’] vs global $wp_query
- Broken? WP_Query and “attachment” as a post type
- Some doubts about how the main query and the custom query works in this custom theme?
- Order by multiple meta key and meta value [closed]
- Post_count only shows the number of results per page
- meta_query ‘compare’ => ‘IN’ not working
- Query posts only with featured image