I have rewritten the query_posts
. As for get_posts
you are better off using the WP_Query due to more control over the tax_query. Explained here.
<?php
$args = array(
'cat' => 84,
'posts_per_page' => 3,
'offset' => 0,
'tax_query' => array(
'relation' => 'NOT IN',
array(
'taxonomy' => 'display',
'field' => 'slug',
'terms' => 'featured-slider'
)
)
);
$wpse42083_query = new WP_Query( $args );
while( $wpse42083_query->have_posts() ) : $wpse42083_query->the_post();
// write post stuff in here
endwhile;
// Reset Post Data
wp_reset_postdata();
?>
Edit: I added the usage.
Related Posts:
- how to override woocommerce specific loop or archive-product.php [closed]
- Custom taxonomy: same terms, but for different years
- How can I create an alternative home page?
- get_terms return errors
- How to show only Standard Format post in my custom taxonomy page -wordpress 3.8.1
- Reproducing hierarchical list output from wp_list_categories(), using get_categories()
- Fast way to add countries as a custom taxonomy term?
- Multiple Queries and Excluding Repeating Posts?
- Is there a filter hook that I can use to change how taxonomy term names are displayed?
- How to Register and Display Widget for Custom taxonomy
- Last post is not showing up
- get_option issues
- Show Custom Taxonomy Slug(s)?
- Show post page only if the user has bought a specific product
- Adding Pagination on a Custom Author Page
- Custom Taxonomy Archive not displaying entries
- Hide custom field if empty
- Filter posts by custom taxonomy terms
- Loop through custom fields with similar label / common chars in label
- Function to remove archive sidebar for custom taxonomy?
- Pagination Issues using WP_Paginate Plugin
- Automatically check parents (in a taxonomy) when child is selected
- CPT Loop with ACF and passing ID between Loops
- How to add textarea field to taxonomy (tag)?
- How can I get the custom post type assigned to a current custom taxonomy for query?
- How can I display a PHP foreach loop’s answers by AJAX
- wp_query get post custom taxonomy in search.php
- How to get every custom taxonomy names and urls?
- Get Custom Taxonomy Terms by Date
- Display specific Taxonomy Term from Custom Post Type
- Semi complicated custom taxonomy question
- Get wordpress taxonomy slug name(s) to use as div class
- How do I list custom taxonomy terms with the links?
- toggle Multiple Loop with tittle
- Echo the Last Child Taxonomy only (not parents)?
- How to query term_id of a Custom Taxonomy by name
- Exclude current post but keep the same posts-per_page amount
- How to show parent taxonomy using get_the_terms?
- wp_insert_post custom taxonomy multiple Category not added
- query variables for custom taxonomies
- wordpress custom fields loop
- If Term Name Exists, Append a Unique ID to Slug
- Display all subterms of a custom taxonomy filtered by parent terms
- My list of terms of custom taxonomy displays 7 times
- Display Custom Taxonomy Name As A Shortcode
- How to show related post with category DESC (ASC) IDs of ID current post
- Taxonomy template is not reading
- Avoid showing the same phrase in the loops
- Multiple loops on same category with different design
- URL issue after setting up Custom Structure in Settings >> Permalinks
- How to assign a default/priority taxonomy to be shown in url in case two taxonomy items are selected
- Custom query pagination with php parameter as arg problem
- Post filter with multiple checkbox taxonomy terms
- Combine Categories & Custom Taxonomy
- Multisite – Getting Meta query to select from wp_2 tables
- How to append the excerpt to the content in the single post page?
- Custom dropdown search form that allows users to select option B based from Option 1
- Multiple Owl Carousels on the same page with navigation problem
- Pull A Single Post Prior To Running wp_query
- issue with saving custom metaboxes fields
- Highlight specific user with custom field value
- custom loop issue
- Secondary loop doesn’t work
- Taxonomy template by post type
- How to loop through 1 CPT with 2 Taxonomies
- Custom terms in custom category taxonomy
- How to setup a taxonomy that can have only one post assigned to it?
- Grouped custom taxonomy query
- Create advanced portal website with sections – taxonomy usage?
- Custom Query for Taxonomy
- Post thats in Two Categories, only want to display name for one
- Adding a third custom taxonomies
- Loop display only 5 posts
- Advanced Custom Fields in WP_Query: Href Returning Empty
- Taxonomy question how to add more data
- How to get a custom taxonomy slug in body classes
- How to: Easily Move a WordPress Install from Development to Production?
- Is there a flowchart for WordPress loading sequence?
- Essential technical features for high-end WordPress web hosting? [closed]
- How to remove admin menu pages inserted by plugins?
- How to put logs in WordPress
- How to get the Date Format and Time Format settings for use in my template?
- Where are Additional CSS files stored
- Best Practices for Regression Testing WordPress Websites?
- Remove wrapping div and ul from output of wp_nav_menu
- Attaching taxonomy data to post with wp_insert_post
- What Is The Use Of map_meta_cap Filter?
- get post author id outside loop
- Custom Walker: how to get ID in function start_lvl
- Creative uses of WordPress [closed]
- How to *remove* a parent theme page template from a child theme?
- How do I make my child theme re-apply the settings that were customised when its parent was active?
- Multiple Inputs in a Customizer Control
- New WP_Customize API – how does it work under the hood?
- Embedding a SOAP Client into a WordPress Plugin?
- Is there anything that Joomla or Drupal can do that can’t be done in WordPress? [closed]
- Update widget form after drag-and-drop (WP save bug)
- Data sanitization: Best Practices with code examples
- How to benchmark a WordPress installation? [closed]
- Should I delete the default themes?