Skip to main content

All Questions

Tagged with
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' => "...
Dennis's user avatar
  • 135
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" => [ "...
user2812779's user avatar
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 ...
ogmios's user avatar
  • 23
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 ...
axel's user avatar
  • 161