Questions tagged [sort]
The sort tag has no usage guidance.
542
questions
0
votes
0
answers
13
views
Add a custom field for sorting the products in a specific category WOOCOMMERCE - Second try
Hi, mainly I need to add an "orderby filter selection" in the above dropdown menu, in WOO product category widget, based on an ACF field.
The final "OrderBy dropdown menu" content ...
0
votes
0
answers
28
views
Add a custom field for sorting the products in a specific category WOOCOMMERCE
I’d like to add a custom field for sorting the products in a specific category.
I have some products that are visible in different categories and I need that these products will be sort in different ...
0
votes
1
answer
72
views
Elementor - Sort by name
I have a website that lists paintings. All these paintings are made by various artists. I've added a custom post type "paintings" and created a form so each painting can be easily entered. ...
1
vote
1
answer
124
views
query loop "inherit query from template" prevents setting sort order
I need all auto-generated category pages to sort oldest-to-newest
I'm editing my "All Archives" template in block editor but I'm not having any success
it contains a query loop with "...
0
votes
1
answer
214
views
posts_results filter - additional sort, with a meta value, to move posts to the end of the results, with pagination working
I have a custom post type for business locations that I am trying to add an additional sorting filter to by using a custom meta value. The custom field specifies whether or not the location is open or ...
0
votes
1
answer
40
views
Sort Featured Content by Order instead of ID
I am generating a Featured Content with the following code:
<?php
$featured_posts = get_featured_posts();
foreach ( (array) $featured_posts as $order => $post ) :
setup_postdata( $post );
...
0
votes
0
answers
33
views
Sort WooCommerce categories automatically into friendly-looking tree
have a problem, I've uploaded bunch of products into WooCommerce store via XML file. Something like 45,000 products and xml didn't had certain category for every product, instead it had meta tag with ...
0
votes
1
answer
41
views
WP Query order posts not working
Hello I have custom wp query
$args = array('post_type' => 'marketing_en',
'tax_query' => array(
array(
'taxonomy' => 'custom_post_type',
'field' => 'slug',
'terms' ...
3
votes
1
answer
38
views
How can I change the post order after filtering in WordPress?
After filtering the post list in the admin dashboard, how can I change the order of posts after filtering and it will display in the same order at the front end too?
1
vote
0
answers
25
views
Admin custom post ordering
I'm trying to order custom posts in admin page using an acf date/time value,
I've found a useful resource on wpmunchies.com
I've made some changes, so my code is the following:
function ...
1
vote
1
answer
49
views
How to `'orderby' => 'meta_value_num'` in a series of orderby parameters
I'm running a site for a book store. Each book has a catalogue number. These numbers are often a string with numbers in it. For example- PUB 1 would be a common entry, as well as PUB 12. Right now, it'...
0
votes
1
answer
96
views
Sort by multiple columns using get_posts
I have the following:
get_posts(array(
'post_type' => 'event',
'posts_per_page' => -1,
'meta_key' => 'start_date',
'orderby' => '...
0
votes
0
answers
181
views
Sorting by Title for Post Archive Categories for Custom Post Type
I have a custom post type - vendors. They have a taxonomy vendor_category. I am attempting to sort the archive pages by the title (since it defaults to post date). Here is the code that I am putting ...
0
votes
0
answers
26
views
What is wrong with my sorting logic?
Trying to sort a custom query. I need the values to be sorted based on the menu order. The following code prints out all the values as expected, but not in any sorted order. I'm trying to get the ...
0
votes
1
answer
225
views
Sorting Users page admin column with ACF field
I have a CPT called Companies. I created an ACF relationship field called user_company that gets displayed in the Users profile page.
When a user registers, I have to go in and assign them to a ...