You can try this
$args = array(
'post_type' => 'Product',
'orderby' => "name",
'order' => 'ASC',
'posts_per_page' => -1,
'post__in' => $productIds
);
Related Posts:
- How to manage a particular “order by” for get_search_query()?
- Ascending & descending posts on same page with IF statement
- wordpress query – orderby child post date
- Query by one meta_key and sort by another (possibly NULL value)
- Filter query posts by the count of metas for a meta key
- can’t get query to order posts by acf datepicker
- Sorting Grids with Essential Grid and Events Manger
- mySQL query. ORDER BY meta_key
- Order query by post meta value
- Order posts by custom field DATE value
- Ordering by a metadata subfield in WordPress?
- Can’t seem to do combined query AND sort?
- sort query results by newest
- Order by title – but now built in wordpress func, sort the_title
- Querying with WP query using meta key price
- Re-sort get_posts query results
- Order terms by count – missing terms
- How to rearrange a pool of posts joined using two queries?
- How to “orderby” the first array in a meta_query that uses multiply keys?
- Sort query_terms_list for post_tags alphabetically
- JetEngine Query Builder – order by value from repeater
- Custom post type order by post_title
- Orderby event date (if it exists) or post date (if it doesn’t) – how to reorder posts based on meta value OR date
- wp query multiple values > display a specific value first
- Order WordPress Query by Custom Field While Still Using Tax_query Argument
- “order” does not affect order of custom query
- New custom post type entries are not sorted correctly in admin using pre_get_posts
- Query Posts that have or don’t have a meta_value and order by the same ASC
- Apply ordering args to newly merged queried
- Sort loop with query in the link
- WP_Query orderby meta key/value suddely stopped working
- Query posts alphabetically within this function
- Elementor – Sort by name
- How to display SQL query that ran in query?
- How can I create a meta_query with an array as meta_field?
- Query multiple meta key values?
- How to Optimize WP site for millions of posts
- Ignoring initial articles (like ‘a’, ‘an’ or ‘the’) when sorting queries?
- How to Change Order of Posts in Admin?
- How to get comments by post ID?
- ORDER BY custom field value
- Differences between wpdb->get_results() and wpdb->query()
- Sorting: custom query with orderby meta_value_num THEN by title
- Is there a way of increasing the speed of this query?
- Random sort within an already sorted query
- Get all image from single page using this query
- Different post sort order within different categories
- How can I query all users who registered today?
- Get Terms by IDs with IDs order
- Sort posts by Date (DESC) and by Title (ASC)
- Reversing the order of posts AFTER the query is performed
- Sort custom post type list table by display name of a user id stored as post meta value
- what are the numbers between curly brackets in search query
- simple sql query on wp_postmeta very slow
- Using WordPress public query variables
- How to Use Wildcards in $wpdb Queries Using $wpdb->get_results & $wpdb->prepare?
- When/why does ‘$query->get( ‘tax_query’ );’ return empty?
- How to get link and title of next and previous post on single page
- Sort posts by category name and title
- Create pagination and order according to alphabet
- wpdb get posts by taxonomy SQL
- How to get order of posts?
- How to List Events by Year and Month Using Advanced Custom Fields?
- Is there any difference between hooks posts_where with posts_join and posts_search performance wise?
- Custom WP_Query order by post_meta and (author) user_meta
- How many WordPress SQL Queries per page?
- How to display Section for certain time
- Add multiple value to a query variable in WordPress
- How to order users alphabetically by their last name?
- Search custom post type by meta data
- Custom query_var causes displaying posts archive on front page
- Slow wp_enqueue_media()
- Multipart/formatted MySQL query problem
- Sort posts by tags in category pages
- What is the most efficient way of implementing a favorite post system?
- Order posts by meta_value even if meta_key is not filled
- How to sort posts by last name (2nd word) on ONE category only?
- Remove [gallery] shortcode altogether
- Compare two numeric custom fields
- wp_dropdown_categories with multiple select
- Advanced Custom Fields – Query Efficiency
- Query posts from current year
- Why does get_the_time(‘F j’) return November 30 for all posts?
- How can I custom order the results from wp_list_categories?
- How to tune search argument in WP_Query to show only exactly the same results?
- WP_Query ordered by custom field that is a date string?
- WP_Query -> sort results by relevance (= most tags / taxonomy terms in common)
- Sort X categories by last update and show image
- Custom query filter not working on woocommerce category page
- How to delete a transient on post/page publish?
- Custom Post type sort order not working in the admin area
- Very slow query
- How can I set a default listing order on the admin page for a custom taxonomy? (without plugins)
- query multiple taxonomy and show post count
- Search Terms – Querying on either description__like OR name__like in the same Term Query?
- Query & Sort Comments by custom comment meta
- Fulltext search in posts sorted by relevancy
- Order posts by tags count?
- How to get my loop to pull posts into three columns
- How do I sort multiples pages?