0
votes
1answer
10 views

Sort posts by custom fields value using dropdown menu

I'm trying to sort my posts by a custom field value, called price. Only using numbers in the custom field value. I want that the visitors of the website can sort the posts on price by using a ...
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
190 views

Sort Posts by custom fields inside a table

I am trying to build a table in each category pages where all the posts from the category will be displayed and make them sortable by custom fields value. I searched a lot about this and I am not sure ...
0
votes
3answers
164 views

Order by a meta fiel in query loop

I would like to sort my article from a category by a number added in a meta field. Here is the first step, I get the articles to display on the page. <?php $cat = get_post_meta( get_the_ID(), ...
1
vote
3answers
2k views

Query to sort a list by meta key first (if it exists), and show remaining posts without meta key ordered by title

I'm working on a custom taxonomy term page template where we want the items that are connected to the term sorted by a publication date (custom date field) - and if there are multiple items on the ...
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 ...
0
votes
0answers
59 views

What is the best way to sort posts by a custom algorithm?

I'm wondering what is the best way to sort posts on homepage using a small algorithm like custom_field_votes / ( post_hours_old + 2 ) ^ 1.8 I have tried creating a new custom field with the result ...
0
votes
1answer
168 views

How To Show Get Adjacent Posts If Posts Are Sorted By Custom Field

I want to get the ID of adjacent posts. For posts sorted chronologically you can use: get_adjacent_post Are there any standard methods for finding the adjacent post if the posts are sorted by ...
0
votes
1answer
185 views

Sort categories by meta value

How can I make a list of categories with 4 last posts in each where every category is sorted by meta_value. For example, template without sorting by meta_value is http://pastebin.com/AeH6vx9b It ...
3
votes
1answer
987 views

Auto sort the wp-admin post list by a meta key

I am using this following code in my functions file to hide and add some custom columns to my post-edit screen in wp-admin. I am now trying to get the post list to sort by a post meta field (last ...
0
votes
1answer
863 views

Order by custom field date?

I've created a category "Expire Soon" and i want to insert and sort the posts by custom field "expiration_date". I use this code but the posts are sorted by custom field "expiration_date" but not by ...
0
votes
2answers
711 views

Select custom posts by meta_value and sort by a different meta value

I have my query set up like this: $article_query = new WP_Query(array( 'meta_key' => 'issue', 'meta_value' => $post->ID , 'post_type' => ...
0
votes
1answer
32 views

Listing the most popular 8 city (custom fields) as used in posts

Hi there i am creating a theme for a classifieds website and want to list the top 8 popular city which mentioned as posts custom fields. That means the top 8 cities which have the most classifieds. it ...
0
votes
1answer
35 views

list pages by custom_field?

Is there a way for me to sort these posts alphabetically according to the custom field I have defined (last_name)? <?php $page_id = get_the_ID(); $args = array('sort_order'=>'DESC', ...
1
vote
1answer
1k views

get_pages sort alphabetically by meta value

I operate a real estate website, and I have a list of homes we are selling. I am using a bunch of custom fields to store information about the homes. When you click on a home in the home listing page ...
0
votes
1answer
777 views

How to sort by custom field value?

I am using these code to sort most Commented, Most viewed Posts <?php $params = $_GET; unset($params['orderby']); unset($params['order']); unset($params['v_orderby']); unset($params['v_sortby']); ...
2
votes
1answer
177 views

Sort by posts that have a featured image?

I'd like to sort posts on the index page to show those that have a featured image first. I've done this in functions.php: add_filter( 'pre_get_posts', 'my_get_posts' ); function ...
0
votes
1answer
504 views

Plugin that lets visitors Like a post (not facebook) and stores likes in custom meta?

Does anyone know of a plugin that has a like feature or thumbs up down etc which stores these likes as custom meta data? Not a facebook like. I'm currently using WTI Likes which stores the data in a ...
0
votes
2answers
191 views

Custom Query Fields - Altering Meta Value

I'm giving Custom Query Fields a shot for filtering/sorting posts on the front-end of a site. The instructions seem pretty self-explanatory, but I do have another layer that I'm trying to figure out. ...
2
votes
2answers
607 views

Is it possible to order posts by two meta values?

Hopefully this is a reasonably straightforward question! Is it possible to order posts, on the front-end of my WP install, by two meta values? I have a meta key called genus and another called ...
4
votes
4answers
6k views

Sorting a query by custom field date

EDIT: Reworded the question for more clarity I'm trying to sort by custom meta box data, which I am converting to a date using the strtotime function, but I'm having some difficulty. My chief ...
0
votes
1answer
164 views

How to order posts by number of Vimeo Likes

I have number of posts that contain embeded video from Vimeo, I can get vimeo likes and display them inside the post using vimeo API but how can I order those posts by number of Vimeo likes?
0
votes
2answers
887 views

Sort posts after filtering them through multiple taxonomies

I'm using scribu's Query Multiple Taxonomies to filter posts through multiple taxonomies (which works great!). However, I'd like to allow people to perform further sorting on the results based on ...
0
votes
1answer
562 views

How can I sort the order of multiple custom field values in a custom post type?

Here's the website: KunzlerIP At the bottom of the website, you see a slider using Fancybox. Each thumbnail pops up some content from an individual custom post type post. For this custom post type, ...
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 ...
0
votes
1answer
892 views

Sort category page with custom field

This is similar to another question I asked, but I can't recognize how this query string works. I have a custom field called "category_order" and I would like to sort my category page by this order ...
1
vote
1answer
931 views

Sorting posts ordered by custom field value

I have a series of posts (using a wp-zoom theme). I would like to create a custom field called order and sort by that field. Here is part of my homepage code: <?php $z = ...
0
votes
2answers
791 views

Filter or order based on custom field

I have added a custom field to some posts called 'frontpagerank' The plan is to order the posts by this value but first I just want to filter out any that don't use a front page rank. I have achieved ...
4
votes
1answer
2k views

How to order adjacent posts (prev / next) by custom field value?

I am using the More Fields and More Types plugins to create a custom post type called product. This custom type is based on the Post type. One of the fields is named lot which is an integer ...
3
votes
2answers
2k views

Archive sorting functions by custom fields (front-end)

I want to give the users the ability to sort the posts in the archive by some custom fields that I pre-define. The end result would be en a tabbed container, and the user will click on the relevant ...
3
votes
1answer
3k views

Custom Taxonomy Template Post List with Sort Order

I have an interesting problem I am trying to solve. Here is my situations: I have create a custom post type for "events". For each event post I require custom fields to be entered for the event ...
1
vote
3answers
4k views

Sorting WordPress Posts via Custom Field Values?

Ok, so I'm using the WPAlchemy class to create custom field write panels in the write post page, and so far everything has gone great... However, there's one issue I can't seem to figure out. I'm ...