All Questions
4
questions
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
1k
views
Ascending & descending posts on same page with IF statement
I need to be able to display a list of events on 1 page. The top list would be for upcoming events and to be sorted with earliest event first and the second list would be for expired/past events and ...
0
votes
1
answer
1k
views
How to manage a particular "order by" for get_search_query()?
How to manage in the search.php file the order of a posts search query managed with the following code
<?php
echo sprintf(__('%s Zoekresultaten voor ', 'website'), $wp_query->found_posts);
echo ...