All Questions
11
questions with no upvoted or accepted answers
2
votes
0
answers
78
views
Sorting posts alphabetical that have single digits
I have post titles that are like this:
Episode 1
Episode 2
Episode 6
Episode 10
Episode 14
I try to list posts alphabetically but it ends up showing like this:
Episode 1
Episode 10
Episode 14
...
1
vote
0
answers
419
views
Compare ACF date field (if exists) and post date and order DESC
I have an ACF date field (same format as post date) and in my Query I want it to be compared to the publish date of the post:
If erstelldatum is not empty use erstelldatum for order
If erstelldatum ...
1
vote
0
answers
533
views
WP_query sorting can't sort danish letters (æ, ø, å)
I am having an issue, with making a WP query sort correctly, using danish special letters (æ, ø and å in this case).
I have a loop running a query for certain post types, then returning them ...
0
votes
1
answer
75
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. ...
0
votes
1
answer
294
views
Order posts ascending from posts in array
I have all my post id's in a specific array $productIds. When I want to show only these posts, I do this query:
$args = array(
'post_type' => 'Product',
'orderby' => "...
0
votes
1
answer
175
views
Custom post type order by post_title
I got a custom post type called "employees" and this is the query I use with FacetWP (plugin we are using). We want to sort the employees by post_title.
<?php
return [
"post_type" => [
"...
0
votes
1
answer
714
views
Orderby event date (if it exists) or post date (if it doesn't) - how to reorder posts based on meta value OR date
I need a way to sort the posts on my tag and category archives according to the event date (if it exists) OR post date (if it doesn't).
I have a combined archive for events and posts, but want to ...
0
votes
1
answer
128
views
Ignoring 'a' when sorting posts
I'm attempting to sort my posts on a page while ignoring 'a', 'an' and 'the'. I found a good example on this page: https://css-tricks.com/ignoring-the-in-wordpress-queries/
My Query
$args = array(
...
0
votes
0
answers
39
views
New custom post type entries are not sorted correctly in admin using pre_get_posts
I am working on a WordPress plugin and trying to use the pre_get_posts hook. Everything seems to sort, but when I add new items through the back-end, they get added to the bottom and not sorted for ...
0
votes
1
answer
76
views
Sort / Filter Queries
I'm working on a website, that showcases products, and now I'm working on the query part. Basically I want to have one page, that displays a list of products as a normal query, and then on top of the ...
0
votes
1
answer
497
views
Sort loop with query in the link
I want to add some buttons that will sort the post by name asc/desc etc.
I want to use query in the link like this
http://domain.tld/?orderby=name&order=asc
Is this safe to use?
Are there ...