I’ve got an answer that worked perfeclty for me in another forum, so I’ll post here if sometime anyone gets a similar problem
$argsPost = array(
'post_type'=>'album',
'orderby'=>'date',
'order' => 'DESC',
'posts_per_page'=>'4',
'tax_query' => array(
array(
'taxonomy' => 'albuns_categories',
'field' => 'slug',
'terms' => array( 'ANYTERM' ),
'operator' => 'IN'
)
)
);
=D
Related Posts:
- The Operator “NOT IN” Does Not Work In tax_query
- Sorting a list of posts displayed under a list of associated terms (which should be sorted without initial articles)
- Combine tax_query and meta_query in WP_Query
- tax_query returning all posts instead of selective posts in WP_Query
- Custom post taxonomies as tax_query terms?
- Why is this query not working? (Standard posts + custom post type)
- Custom Widget WP_Query problem
- How to display Related Posts based on number of taxonomy terms matched
- tax_query not working in template
- WP_query – Filter by tax_query and meta_query using multiple select
- WP_Query parameter conflict
- Custom Category Walker with Image, Fallback to Most Recent Post in Category Image
- tax_query (if the terms are empty)
- Running a custom query inside another cpt single and trying to grab a variable
- Custom Query: Multiple CPTs and a taxonomy filter
- Display related CPT with custom taxonomy
- custom post type and a “sticky” position taxonomy
- How to search through all child taxonomies using WP_Query?
- WP Query tax_query not returning posts
- Not able to get my custom search result using meta_query and tax_query together?
- Query breaking with ‘posts_per_page’ => -1
- tax_query showing no results
- Cannot query custom post type taxonomy from theme options array
- Using tax_query to get single post per category
- WP Query Conditionally query meta and taxonomy
- WP_Query inside foreach loop returning same value for all options when filtered using ajax
- Mixing 2 custom post types with posts output in specific pattern
- creat filter with wp_query
- Troubles with acf/save_post and WP_Query
- A method for ordering mixed dates in search result loop (theory only, no actual code)
- Query custom post type with ACF Date
- How to do WP_Query with two meta fields with orderby clause
- Stuck in Order by more then one
- Display featured image from one CPT within another CPT query
- Custom WP Query on custom meta and sort by multiple meta keys value
- Show only one post on custom post type archive
- Woocommerce search pagination not working
- How to order WP_Query by parent for hierarchical Custom Post Type?
- Including metaboxes from custom post types in global search — continued
- WordPress loop: Show only a Custom Post Type Taxononmy TERM
- How can I made custom taxonomies relationship?
- Query Multiple Custom Posts by Custom Fields
- What’s the WP way to load remaining custom posts?
- How do you paginate a query grouped by month?
- Custom taxonomies relationship
- Get Posts by multiple custom fields is not working
- Custom post type ‘articles’ ignores posts_per_page, reserved post_type?
- Several post types on WP Query by tag and taxonomy
- Using meta_query and tax_query at the same time
- WP Query with categories only shows one post and ignores the category
- Polylang non-default language ignores tags in WP_Query
- WordPress request fiter order by related post’s post_title
- Custom query at top of archive search page, arguments are overridden
- Order Custom Post Type by Custom Field Value
- How do I display the grand child items of a taxonomy term?
- WP_Query custom post type query not showing the exact post type
- How to display post list inside post
- Pagination issue on category.php using custom post type query
- How to have this permalink structure: post_type/postname/custom_inner_page
- Problem: wp_query outputs all images on site
- Query Custom Post Type Taxonomy term with multiple parameters
- Sort entries by date mixing two post types
- Why is my category template ignoring post type?
- First custom field value (out of several) displayed twice after query
- wp_reset_postdata() and wp_reset_query() inside shortcode are not working to reset original page query
- Prioritize posts in query by meta keys?
- Change sort order when using ‘orderby’ => ‘type’
- Add Custom Post Type of specific Custom Taxonomy to regularly blog loop
- How to get all tags of a custom post type by id
- Filter Posts from the Main Query
- WP_Query orderby and tax_query
- Configuring a meta query with multiple post types that have the same relationship on a single page
- Different Ways to Query Custom Post Types?
- Order posts by 2 custom fields and if one custom field is zero orderby another custom field
- Pagination with custom query, custom search form, single and pages, ajax and no plugins
- Possible to filter custom post type with multiple meta data?
- can these 3 queries be re-written as 1 query?
- Advanced search form with filters for custom taxonomies
- How does order=asc effect a wp_query (its acting pretty weird in a loop)
- custom post type search by reference id
- pagination not working for category.php (custom post types in categories)
- Query based on custom fields start and end date
- Why is my WP_Query outputting my entries twice?
- Retrieve custom post types by custom taxonomies with WP_Query
- Showing specific post in order of array wp_query
- Add ‘last’ class to second post in featured post loop
- WP the_posts() on single-cars.php get category link
- cannot override post_types in WP_Query()
- Wrapping x posts in html without leaving empty html
- Limiting posts_join, where, etc to a specific WP_Query object?
- Custom Taxonomy Not Showing in Front-End When Outputting a Custom Post Type with WP_Query()
- WP Query post__in not returning correct results
- Proper way to display latest 5 posts grouped by post type?
- Can I display custom post types in home.php or need page template?
- Why is my WP Query not returning first result’s post meta?
- Sort posts in loop by the WooCommerce Membership of the author
- Detect inside a custom query the kind of post type to assign custom classes
- Print current post category during WP_Query
- Different Limit number of post on different archive page
- DIsplaying URL of custom field in last post of certain taxonomy && post type