The taxonomy should be post_format
and term should be post-format-link
. Also simple taxonomy queries are deprecated since 3.1 in favor of tax_query
:
$args = array(
'posts_per_page' => 5,
'tax_query' => array(
array(
'taxonomy' => 'post_format',
'field' => 'slug',
'terms' => 'post-format-link'
)
)
);
$recent = new WP_Query( $args );
Related Posts:
- Does WordPress generate an automatic page for post formats?
- How to query posts of standard post format. For real
- Query different number of posts with different formats in one go
- How to query for posts without a post_format
- How to exclude post formats from wordpress recent posts in a tabs widget [closed]
- Query only the posts with a post format of “audio”
- How to display all posts not in a post_format
- Post archive for certain post format
- How to create Page templates for showing Blog posts in different layouts?
- Query posts in current category but not attachment format
- An archive page without post format (just standard post)
- Exclude post formats in custom loop
- Display post format post in the sidebar
- WP_Query with “post_title LIKE ‘something%'”?
- How to extend WP_Query to include custom table in query?
- compare meta_query in get_posts arguments
- How do I order pages and categories by ID or name in the same query?
- How to do a query only on a specific admin page?
- WP Cron and wp_insert_post
- How to adjust found_posts so that it accounts for offset and pagination
- SQL query equivalent to WP User Query
- Function to check if author has posted within the last x days
- Single page theme that uses pages for the content
- Show default content if custom WP_Query has no posts
- WP Query for Posts (Products) in Specific Category that has 2 Specific Tags (*AND* both tags not *OR*)
- Pagination for custom query on single.php
- wp_transients | wp_object_cache VS SESSIONS & Cookies?
- Get product list of given category
- Remove ellipsis from the excerpt retrieved using get_the_excerpt()
- WordPress query vars are not added
- When querying a combination of posts and other meta fields, is there a better solution than directly modifying the WHERE value?
- Alternative to query->set that appends conditions instead of overriding
- Group WP_Query by meta_key date
- Set if condition with wp_nav_menu
- why update and delete query not worked in custom table?
- get_users is missing or skipping over users in loop
- WP_Query sorted by custom taxonomy
- how to handle multiple ajax wordpress queries?
- problem by deleting new plugin installed inside the WordPress after any heroku app sleeping [closed]
- Use posts_groupby filter with part of string in wp_query?
- Adding multiple meta_key fields as orderby options to a WP Query via a function
- 1/3 of posts different class
- wp_Qwery works to slow
- Search for “2nd” also returns “22nd” in wp_query
- How to output the title of the blogs home page
- Get posts by list of post IDs ordered by those IDs?
- WordPress Blog Posts with Pagination inside a Page/Post
- Reset WordPress Post Query to default
- Woocommerce – exclude only older out-of-stock items
- Limit home post to 10 without creating pagination?
- Using custom taxonomies in a query
- ACF accessing a field from the query, but not in post
- What is the best way (regarding performance) to set transients for logged in users?
- List of ways to access WordPress database?
- WP_Query Meta_key is text value and need to sort as numeric not working
- Is there a ‘compare’ option when using WP_Query apart from meta_query
- WP_Query Results Issue with ACF
- Create a page template for “top rated posts” but show full content and not just a list
- Why tax_query in WP_Query not working
- Differentiate Nested WP_Query from Parent
- WP_User_Query and user posts
- Add URL Rewrite Rule To WordPress
- WP order ASC in custom author loop
- localizing variable on front-page.php template fails but succeeds on single page and taxonomy archive
- Remove from array in WP_Query loop
- How can I detect if the current post is in this loop?
- Posts limit on homepage (genesis framework)
- wpquery via ajax
- Trouble passing attribute into shortcode function
- Where is this query?
- Exclude post with taxonomy and from the terms (taxonomy & tag) posts count
- WordPress search WP_Query to cover multiple post types and their custom fields?
- How to merge multiple foreach into 1 foreach and sort by date
- posts_per_page not working in block
- Why does my output of get_the_ID() change after a wp_query?
- Very slow query generated getting meta data from posts
- Ajax buttons not working properly in WooCommerce when using wc_get_template_part
- Limit default Search query to post_title
- in tax_query this Is the code correct? I need to access beginner video posts for different subject
- WP Query works outside a function, not inside a function
- Problem with custom WP_Query and underlying pagination/posts_per_page
- Pull posts from all categories if quantity is not met?
- WordPress WP_Query offset parameter not working with search parameter
- How to query images from a post to use in a slider
- Custom post type archive organized by category
- Adding page subdirectory dynamically, as like buddypress does
- orderby in WP_query doesn’t works
- qTranslate get content by language using wp_query
- Displaying content to search engines but via navigation only for registered users.
- Custom search: Search posts but display parent page in results
- Renaming or Moving WP-Content Pros/Cons
- WP_Query with tax_query not working
- Pagination with Custom Post Type not working on index.php: I get a 404
- Get access to all terms associated to each post that the wp_query loop displays
- WP_Query by meta key not returning any posts
- Pagination only showed when no category is set in wp_query
- taxonomy-{term}.php terms pagination returning 404 after a certain page
- Using WP Query, I want to include all posts in category 1 as long as they are not also in category 2
- Prevent URL Parameter Affecting other WP Query
- Sort by multiple columns using get_posts