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
- order by numeric value for meta value
- numberposts? showposts? posts_per_page?
- How to query only for products with status “in stock” in WooCommerce? [closed]
- WP_Query displaying ALL posts
- How to limit the posts
- WP Rest API v2 return posts with specific tag
- How to order posts in wp_query by a meta_value of the corresponding author
- How to get sum of meta_values of a meta_key in wp_query according to conditions
- Get the post thumbnail with wp_query
- Where to use $post global variable?
- Multiple instances of Featured Image Query
- Storing query variable and then using wp_reset_query
- exclude posts with a specific custom field and value
- Redirect page when URL parameter not set
- Query posts(CPT, pages , hierarchical) by Ancestor ID
- Input check to custom post type query
- Get a list of posts with associated meta_value
- Query post with meta value in set of values
- get_template_part causes 500 error
- Get posts in taxonomy randomly
- Max Posts and Memory Limit
- WP_Query orderby
- Using Ajax and WP_Query to load more posts on category page fails
- I have problems with the search query using multiple post types
- How to check if logged in user have pending custom post?
- Different query result on local and server
- How can I show only last year posts in wordpress archive?
- Change database image location for transportability
- Combine Tax Archive and Meta_Query in WP_Query
- Get posts by birthday
- how to avoid reloading/refresh the page when displaying the post of wp_list_categories
- Pagination not working with WP_QUERY
- Custom Content Slider stop duplicate
- Sort Posts with custom meta key by default which is currently set as optional
- wp_query pagination links producing 404
- Carousel slider with WP_Query to show 3 posts on each slide
- how to use transient method?
- WP_Query – meta fields numeric