The 'posts_per_page' => -1,
and 'nopaging' => true,
shouldn’t be in your tax_query
params. That might be what’s throwing it off.
Try:
$args = array(
'post_type'=>'gpp_prod',
'orderby' => 'title',
'order' => 'ASC',
'posts_per_page' => -1,
'nopaging' => true,
);
and:
$args['tax_query'] = array(
array(
'taxonomy' => 'cat_prod',
'field' => 'term_id',
'terms' => $category
)
);
Related Posts:
- Very slow query
- Does meta_query work within get_posts array?
- How to show more than 5 posts?
- How to optimize my query filtering out unwanted data?
- Remove posts from query for events whose start date has passed
- get_posts() loop returns the same the_title() for each post
- List all posts from past week grouped by sub-category
- Order posts by custom field DATE value
- How do I see the mysql query generated by get_posts( $args )?
- Create Indexes for Slow Queries
- pre saved posts query from db options table
- Re-sort get_posts query results
- Can I include get_posts in this array?
- How can I get posts by 2 meta keys, prioritising one of them?
- Category_in return empty
- Sort order in get_posts [closed]
- Get the ID of the latest post
- Get all image from single page using this query
- Add multiple value to a query variable in WordPress
- wp_dropdown_categories with multiple select
- How to tune search argument in WP_Query to show only exactly the same results?
- How to get my loop to pull posts into three columns
- Custom $wpdb Query for Custom Post Type by Category
- Limit number of pages in pagination
- Can’t pass table to $wpdb->prepare
- How to extract all ID variables from a query string?
- Date query year and month OR just year
- Are database queries created using WordPress filters protected from SQL injection?
- get post id using the $query_vars variable
- Remove Unnecessary Mysql Query
- Is there a conditional tag for latest post or do i need a query?
- wpdb::prepare() isn’t working
- How can I apply a meta query for a single custom post type in the main query?
- How to check current user in meta value array in WP_Query meta_query
- Using pre_get_posts to target a query in the sidebar
- How select a specific query when setting offset?
- Change media attachment author via mysql query
- Temporarily storing main search result
- Help with MySQL to $WPDB query
- Ordering by a metadata subfield in WordPress?
- sql select query in wordpress ‘page’ [closed]
- wpdb->term_taxonomy count posts from both published and private posts?
- Issue with using add_rewrite_rule() for post querying custom fields
- Group custom post listing in admin section
- Plugin will sort users by usermeta
- problem with sql query in wordpress plugin
- Attempt to improve WP search, can someone check my SQL query?
- WordPress Query orderby title with UTF8 string in title
- Searching With Apostrophe
- List author’s posts with SQL
- Where is the query in wp-login.php
- Order posts by recent comments
- query if page has not child
- Number of posts in the archive
- What is wrong with my wp query, cant exclude the category that i want
- how to insert missing tags into the posts through mySQL?
- How to write update query in WordPress to expire transients
- Query Nickname rather than Display Name in custom Woocommerce plugin
- get posts by tag to showing in a widget
- Get previous posts list
- how to replace old DW site with new WP site? [closed]
- Mysql query not working on WordPress 4.2.2
- WordPress SQL query to tag all posts containing a specific word on title
- Order terms by count – missing terms
- Querying Advanced Custom Fields
- How to rearrange a pool of posts joined using two queries?
- wpdb update multiple row?
- How properly create a blog template for wordpress?
- Is there a way to add a link directly into this media query?
- Custom query Custom-Post-Types creates error
- Formatting a date/time returned from a custom $wpdb query
- Prioritising and Ordering Posts By Category Name Using A Custom Loop
- Rewrite rule for query params
- meta_query not working
- Cannot get sql request from Query object?
- Hook into the Admin Dashboard and redirect users
- Displaying data from custom table
- SEO friendly query vars
- Question about of query
- Prevent versioning for .woff (font) files
- How to get meta key list efficiently?
- Orderby event date (if it exists) or post date (if it doesn’t) – how to reorder posts based on meta value OR date
- Modify behaviour of “s” parameter in wp_query
- OR condition not working
- Query not returning child posts for any parent post ID
- How to make MySQL search queries with quotes
- Limiting a filtered query
- Use $wpdb->get_results with filter based on array
- Add Hook for clearing transient when post is added
- Show links to child pages on both parent AND child pages
- learn to run wpdb class
- Display old posts if no future posts exist
- Access Tables with number prefix
- Modify Global Posts Plugin
- How to reference same column name but different table in custom db query
- Retrieving custom field array value through db query
- how to add a read more button to my blog page?
- SQL Query : how copy all tags of post into their post content in wordpress by sql query
- Query parsing only author ids
- How to figure out correct wp_options to have autoload=’yes’