0
votes
2answers
15 views

Filtered by a custom field, ordered by another

I am trying to loop custom post-types, filtered by a custom field artist-status => invited and ordered by another custom field last-name alphabetically. Here is what I managed to write, and it ...
0
votes
2answers
37 views

How to display custom post type ordered by a custom field date

I have a custom post type for a timeline activities. each post of them has a custom field type of DATE. field name :activity-date I'm using TYPES plugin for Custom Post Type and Custom Fields I ...
0
votes
1answer
54 views

Order posts by date and then by custom field

I am trying to do something like this one. Ordering posts by day (not time) AND meta value I want to list blog posts ordered by date (not time) and then within that day, I want to sort them by custom ...
0
votes
1answer
35 views

Sorting posts by Multiple custom fields in defined order

I'm currently sorting some posts out by custom fields 'role' and 'surname', using the following: function customorder($orderby) { return 'mt1.meta_value DESC, mt2.meta_value ASC'; } $args = ...
0
votes
2answers
23 views

Order Custom Posts by Several Fields

I have a page that lists out the members of our band, as a custom post type. I am trying to order the members by several custom fields, field by category, or "section, then by their class, and then ...
0
votes
1answer
30 views

$args Orderby The number

I have this code $cat_args=array( 'include' => '42,210,21', 'orderby' => '42,210,21', 'order' => 'asc' ); $categories=get_categories($cat_args); foreach($categories as $category) { ...
0
votes
1answer
36 views

Create a list of posts with topic headdings

I would like to use a custom field "topic" to order Wordpress posts. This seems quite doable using 'orderby' => 'meta_value', 'meta_key' => 'topic' But I would also like to have a title of ...
0
votes
0answers
28 views

Order posts by average

I am using advance custom fields and i have used the custom fields to create an average score. Now i want to order the posts by the average score I have tried to do it but it doesnt seem to work here ...
0
votes
0answers
15 views

Order custom post by custom post field

I know that question has already be posted, but their anwser doesn't work for me. (or it doesn't work with WP > 3.8) $args = array('meta_query' => $meta_query , 'post_type' => ...
0
votes
0answers
16 views

Sort WP_Query by one meta key and post_date [duplicate]

I want to order by post to check for the existence of a meta key ('featured') and include those posts first and as a secondary option I want to sort by post_date, similar to 'sticky' posts on a ...
0
votes
0answers
39 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. ...
1
vote
1answer
164 views

Trying to sort and display categories(not posts) by custom field: 'order'

I'm a WordPress rookie. I've added a custom field to my "Category" taxonomy. The custom field is "custom_order" and its purpose is to hold a number so that my categories can be sorted and displayed in ...
0
votes
0answers
52 views

Order a query by meta_value and then by post_date

I'm using the following query (mytheme/function.php) to sort posts by Custom Field(=admin_rate) function sort_searchresult_by_admin_rate($k) { if (!is_home()) { $k->query_vars['meta_key'] = ...
0
votes
1answer
420 views

Order Custom post type loop by custom field (datepicker)

I know there are a lot of articles and documentation on this but I can't seem to figure it out. I have a custom post type 'agenda' wich is made for events. I want to sort this by the eventdate. For ...
0
votes
2answers
51 views

WP Query - Is this correct?

Trying to debug, getting headache so I want to ensure that I have placed the query args in the correct place. I want to sort/order all my posts based on "myvalue". if ( have_posts() ) : /* Start ...
0
votes
0answers
101 views

Wordpress sort custom field values in alphabetical order

I am using WordPress Custom Content Type Manager to build a Literary Agency website. The page I'm stuck on is the Authors page which displays thumbnails of all the books related to the author. The ...
1
vote
1answer
2k views

Order get_terms() By Custom Field

I want to order my categories like I order my pages. I've added an extra field called Order to my taxonomy, but how do I order my terms by this value? Adding and Saving my Order Value: /** Add New ...
0
votes
1answer
56 views

Order by custom field in query multiple

After performing this question, I went to the next step and I wanted to sort the query results by another custom field. I want to sort the results by a custom field that consists of a date and want ...
0
votes
1answer
76 views

Order by Custom Field date not recognized

Ok, so I have this custom field wpcf-evento-data-inicio1 generated with the (great) Types plugin. This is how it stores on db: 1372896000 OK, so I want to order by this value. I'm doing it by url ...
1
vote
1answer
149 views

Change order of posts

I made a post recently that did not explained myself right! Come again, but with better explanations. I need the "Select Option" change the order of query_posts. My current code is: <select> ...
0
votes
1answer
321 views

Transfer taxonomy to custom field

I have a blog with movie critics and I'm using many taxonomies to add some informations about the movies, like director, actors or it's year. Using taxonomies is really useful to display all movies ...
0
votes
1answer
80 views

404 on Pages for Custom Post Type & Query_Posts

It took me quite a while to find a good solution for ordering a custom post type by two custom meta keys. When I finally got it working, I found out the pagination no longer works. I've tried dozens ...
0
votes
1answer
213 views

Order custom fields alphabetically

I've been trying to order the custom fields alphabetically, but I can't get the ordered list I want... this is the code I'm using: <?php $vMarca = get_field('tienda_marcas' , false, ...
1
vote
2answers
152 views

List upcoming events, ordered by date in a custom field

I want to display a list of events with dates in upcoming order. Ex: 23 March, 2013, 30 March, 2013 Below is the query I'm using to filter out posts from my database: query_posts( ...
0
votes
1answer
721 views

WP_Query orderby not working with meta_value_num and menu_order

I have made a custom post type (sidebar_element) which are shown on sidebar. On each sidebar element admin can choose where in sidebar should that element be shown, ie. 'top', 'middle' or 'bottom', ...
0
votes
1answer
177 views

How can I sort posts by the date and a custom meta field?

I have custom meta field that I use for the post rating. So I want to display posts by the date and the rating, but only for the posts that have specific rating. For example, I want to display posts ...
1
vote
0answers
342 views

Meta query with multiple custom fields for archives page ordering problem

I'm modifying the query for archives pages so that the posts showing up on year, month or day pages are queried by there custom field (start-date and end-date) and are sorted by custom star-date ...
2
votes
2answers
275 views

Trying to perform complex custom field query with order by set to field value

I've got two custom fields for event posts: event-start and event-end. When I'm querying for current events, I'd like to show any post where the event-start OR the event-end is greater than or equal ...
4
votes
3answers
723 views

Sort posts by custom field numeric value using dropdown

I've read umpteen answers and questions about things that are very similar to this but I just can't get it to work for my specific situation. I have some posts with a category of "property". In ...
0
votes
1answer
195 views

Ordering by 'Title' OR 'Custom Field'

I have an issue here that I just can't wrap my head around. Let me jump right into it: Basically I have a site that has 4 order options; -Name Ascending -Name Descending -Price Ascending -Price ...
0
votes
1answer
2k views

Order by custom field date with ASC order

I've found several similar question but none of them explains why the below is giving me nothing with ASC order. It works with DESC. Basically it's a query that should list posts where the custom ...
3
votes
2answers
223 views

Order Posts by Closest Numeric Values

I'm using custom post types to display properties and have a custom price field assigned to each post. On the property page I want to display a list of four similarly priced properties, two less than ...
0
votes
2answers
289 views

Add a custom meta box for client to order CPT posts how they want

Im looking for a way to add a custom meta box to a custom post type that will allow the user/client order the posts to show up how they want on the site. Is this possible? Basically using a very ...
6
votes
1answer
14k views

WP_Query - Order results by meta value

I've checked around and haven't seen an answer which works as of yet. I have a WP_Query with the following arguements: $args = array( 'post_status' => 'publish', 'post_type' => ...
0
votes
1answer
133 views

Problem with writting correctly a query posts args in Wordpress

In my posts custom fields, I have a meta_key named ending. The value of it is a date in the form of 30-11-2011 (dd-mm-yyyy). I tried this below but with no luck. ...
0
votes
1answer
781 views

How to query posts by month based on date custom field?

I currently created a custom field for a custom post type that stores a date in the format dd/mm/yyyy is there a way to query the posts by the month? I "kind of" got the functionality I need using ...
0
votes
2answers
1k views

Sorting within nested queries / multiple meta keys

I have the following ALMOST working perfectly, but have run into a couple of issues. Right now this displays a Books archive page, ordered like this: Genre Name -- Series Name --- Books ...
3
votes
1answer
226 views

Is there a way to do multiple ordering on a multiple meta_query?

I'm experimenting with searches and multiple criterias and ordering. Let's say we have a real estate site, all posts have 2 custom fields (price and surface), and we want the visitor to be able to ...