0
votes
0answers
20 views

Post Query Glitch Causing First Post to be Out of Order

My problem is that there is a stubborn post at the top of the set of returned posts that somehow isn't sorted with the rest of them. Despite upgrading to 3.9, this issue still persists. For ...
0
votes
0answers
36 views

query_posts with sorting on a custom datestamp

I have a custom meta field that I want to use to sort with query_posts but its not ordering my posts properly since it is a datestamp (i.e. 04/21/2014) and its treating it like a normal text string. ...
0
votes
1answer
734 views

orderby:date not working

I have been searching for an answer and it seems like there are a lot of answers for the opposite issue. I am trying to sort by publish date, not by date modified, using this code: ...
0
votes
1answer
105 views

wp_query by last month + sort posts

I'm using the WordPress plugin 'I recommend this', it allows people to 'like' posts. The value is stored as a meta key, which we can query to generate a 'most recommended' page. Plugin -> ...
0
votes
1answer
219 views

If meta_key has value = 6 | Change the wp_posts.post_date to current date

I have three sections: 1-New posts 2-Trending posts 3-Hot Posts I'm using a Vote plugin and i sort every section like this: New Posts: $args = array( 'meta_query'=> array( array( ...
0
votes
1answer
211 views

Alter post order on taxonomy template

I have a taxonomy template that is returning the correct posts (actually a custom post type) but I want to alter the order in which the posts are displayed. However, nothing I've tried will change the ...
0
votes
1answer
188 views

How to get alphabetic listing x other posts, based on first letter post?

Let's say I have a post called "Hello World" and I am on that page... Let's say I have different posts like "Haaaa" and "Hoooo".... What I want to do is showing Haaa and Hooo in a different place (let ...
2
votes
1answer
306 views

Using database meta_values to calculate new post order using pre_get_posts or a 'request' hook

UPDATE: I have worked out my implementation of the selected answer at the bottom of this post. I'm implementing a sorting algorithm based on Reddit's hotness algorithm, in addition to a time-decay ...
1
vote
1answer
749 views

query_posts and custom taxonomy posts order

i have a custom taxonomy defined for "Projects" and a page that shows all the projects. In this page there's a jquery filtering menu (isotope). Initially the page must show all the projects but ...
2
votes
2answers
2k views

Sort Posts by Multiple Meta Values

1) Custom Post Type named "Buying_Locations" 2) Each Post has three meta values of: State, City, Store Name QUESTION: How can you show a list of these posts sorted alphabetically by State, then ...
0
votes
1answer
50 views

Link to most recently created category of custom taxonomy in primary navigation menu

I have a custom taxonomy called Issues (like magazine issues) with categories named after the title of each issue. I created a page called "Current Issue" and added a link to it in the main ...
1
vote
1answer
162 views

Sort by page information by Ascending Numbers

Basically I have a problem that I have details being pulled from advanced custom fields and I currently have them ordered by page title in ascending order. However, instead of ordering them Ascending ...
1
vote
1answer
399 views

Sorting multiple custom post types without a meta key/value pair by sort order

At this current moment. is it possible to sort multiple custom post/page types without a meta key/value? I'm looking to just sort the posts by page attribute order: What have i done so far? I've ...
1
vote
1answer
985 views

Sorting Posts Via Custom Taxonomy Values Using Checkboxes?

I am working on a project that has a dropdown of custom taxonomy values called "Disciplines", there are only 4 of them in the dropdown. The way it has been designed is that you can select more than ...
2
votes
0answers
1k views

query_posts with a custom post type, a meta_query and sorting by post date?

I've searched the archives and found questions similar to what I need, but haven't found exactly what I want. I've got a bunch of products that are sorted by a meta_key of country, and I'd like to be ...
2
votes
1answer
615 views

query_posts sort in multiple directions

I'm trying to improve my post sorting by using multiple criteria, but I want specific orders for different values. For example, I have a meta_key called 'featured' that I want to move any post up to ...
1
vote
1answer
1k views

Sort query_posts for Parent Pages to menue order or the count?

thanks to a member here i display my Parent Pages in a 2 column grid with title and excerpt. But for some reason i can't figure out how to sort all 5 Pages by the menu order for example or the order ...
3
votes
2answers
509 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 ...
1
vote
1answer
902 views

Custom Post Type sorted by Title

I created a non-hierarchical custom post type and, by default, it's sorted by date published. I know I can reorder them by Title with query_posts() in the archive template: global $query_string; ...
1
vote
1answer
956 views

Order posts using a custom array

I have an array of post ids which I'm passing to query_posts using 'post__in'. My question is how can I use the order from my array rather than ordering by 'date' etc?
6
votes
1answer
9k views

How to query_posts using meta_query to orderby meta_key AND have a secondary sort by date?

I've been troubleshooting an issue over the past few days and keep going in circles. Could really use a fresh pair of eyes to help me answer this question... So I'm working with a wordpress site ...
1
vote
1answer
613 views

sort posts by alphabetic plugin suggestion

I am looking for plugin to sort posts by alphabetic orders. Sort: A-Z Z-A Newest Oldest and option to view per page like in stake exchange websites Per Page: 20 40 60 All if not exists, can i ...
5
votes
1answer
5k views

Using meta_query, how can i filter by a custom field and order by another one?

With the following code (in functions.php) my posts (of CPT event) are ordered by _end_date instead of _start_date. What's the proper solution to this as of WP 3.1.3? Of course I'd like to avoid using ...
4
votes
5answers
4k views

How to return results of a get_posts() in explicitly defined order

I'm trying to create a loop of explicity ordered posts, for example: <?php $args = array( 'include' => '1,3,8,4,12' ); ?> <?php get_posts( $args ); ?> The results are ...
3
votes
2answers
3k views

Sort posts alphabetically by custom field value, insert divider between different letters

i'm listing all posts of my custom post type "person" alphabetically sorted by the custom field last_name on a page. How would i insert a divider (e.g. an image of the letter) before a letter range ...
0
votes
1answer
1k views

Sorting the Loop by Taxonomy Value

This is a similar question to Sorting for each custom taxonomy, but I don't feel like it was clearly asked or responded to. I have a custom post type "player" and a custom taxonomy "player_details". ...
0
votes
2answers
3k views

Sorting problem with 'query_posts' funcion in wordpress. Sort by custom field not working

0 down vote favorite Hi, I am working with wordpress where i have a event listing system. There is a custom field in my post called starting_time which is unix timestamp. Now i want to short all ...