All Questions
35
questions
0
votes
1
answer
156
views
Can't seem to do combined query AND sort?
Below is the code I'm using to query multi-day events. The problem I'm having is that I can either sort by the start date (evstart_date) OR I can do a combined query against start date and end date (...
0
votes
1
answer
286
views
Query posts alphabetically within this function
I've been given some code to tidy up and edit a bit and the client wants to organize a custom post type named "plans" alphabetically.
It's not a straight forward query and I've never come across ...
3
votes
2
answers
746
views
Sort X categories by last update and show image
I want to display X categories, and sort them by last update.
I also want to grab the image of the latest post with the category.
<img src="<?php echo get_image('article_image',1,1,0,NULL,$...
3
votes
3
answers
2k
views
Fulltext search in posts sorted by relevancy
I'm building a custom search page and what I need is to sort results by relevancy (eg. occurences of a keyword)
Using MySQL docs I've built this query:
SELECT ID
FROM $wpdb->posts
WHERE MATCH (...
0
votes
1
answer
270
views
How to "orderby" the first array in a meta_query that uses multiply keys?
My query is currently sorting by end date. How can I make it so it will sort by the start date?
$args = array ('post_type' => 'events',
'meta_query' => array(
...