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
- Wp get all the sub pages of the parent using wp query
- What is appropriate flow for custom data from URL in WP_Query?
- How to merge two queries together
- Is it possible to query all posts that don’t have an attachment?
- WP_Query on different site in a multisite setup
- Page queried instead of a custom taxonomy
- Exclude post on loop by multiple meta key value
- Sanitizing search data for use with WP_Query
- How to search by a post and a category name on wordpress at the same time?
- What’s the point of the query_vars filter?
- Meta query with order by another custom field
- Get Category Archive Template Name Dynamically
- How to limit WP_Query to one result on the loop?
- Query post from all category with same tag on 1 pages
- How to correctly pass values to wpdb->prepare()?
- Filtering posts from different categories into different section by doing WP_Query only once
- Where to put meta Keys
- How to list posts with disabled/closed comments, with pagination?
- WP User Query with Custom Fields and Search Results
- WP_Query order by not working properly due to category I believe
- Function to retrieve IDs of posts, cache results, and improve wp_query
- Search.php – return number of results but cannot loop through
- Creating ‘posts page’ loop based on the page itself
- Combine query in WP_User_Query()
- WPQuery loop not giving expected output
- WordPress tax_query ignoring relation OR
- pagination functions are not working
- Gather same custom field values in one value in a select tag with wp_query
- Order Posts By Youtube Views
- Declare inline background image in functions.php
- Looking for a way to exclude frontpage and nav menu from query filter
- WP Query Obj: Set value to be unequal | Hide media by admin
- I want to place a post before all others from an ACF boleen field
- How to put posts with some taxonomy on top of others in `pre_get_posts`
- WP-Query and Searching Inside Arrays
- Custom WP Query with neither ASC or DESC