Tagged Questions
-2
votes
0answers
30 views
Get all posts starting with first two letters in Wordpress
I have a plugin in which an alphabetical list is posted where people can click on a letter and they get the posts with that letter. So if they click on A, they see all post titles starting with the ...
1
vote
1answer
44 views
Wordpress Custom post query sorting does not work
I created a custom WP query to collect products that have 3 different taxonomy values in them and sorted them by price using the following:
$my_products = new WP_Query(
array(
...
0
votes
1answer
95 views
How do I sort multiples pages?
I want to use a dropdown to sort a list of posts in WordPress. The results will display on multiple pages. So how do I pass the query on to the second, third, fourth, etc. pages?
Here's an example of ...
0
votes
1answer
186 views
Query Posts with MetaValue & MetaKey & SortOrder works, but it doesn't override category order [closed]
I have a query, ordered correctly by the meta_key in ascending order, but they are devided into groups of their category.
This example shows the postorder in the WP category editor:
Cat 6
- sub 1
- - ...
3
votes
2answers
503 views
Sort custom post type list table by display name of a user id stored as post meta value
I have a custom post type named domicile. Each post (domicile) has an owner (not the author). Owners are users with a custom role. I store the user id as a post meta value (dmb_owner) for the domicile ...
0
votes
1answer
120 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
1answer
137 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
2answers
357 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 ...
2
votes
2answers
411 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
1answer
162 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(
...
