order_by
doesn’t take a name of the field, it takes type of order. Which for custom numeric field will be orderby=meta_value_num
. But actual field used is taken from meta_key
and you are already using it for filtering. See Orderby Parameters.
So you can’t pull this of this easily at moment, not without filtering and modifying resulting SQL query. Upcoming WP 3.1 will have much more improved and flexible querying support for custom fields and it will likely be easier than.
Related Posts:
- How to query_posts using meta_query to orderby meta_key AND have a secondary sort by date?
- How to return results of a get_posts() in explicitly defined order
- Sort posts alphabetically by custom field value, insert divider between different letters
- Sort X categories by last update and show image
- query_posts sort in multiple directions
- Using database meta_values to calculate new post order using pre_get_posts or a ‘request’ hook
- Sort Posts by Multiple Meta Values [duplicate]
- Order posts using a custom array
- orderby:date not working
- wp_query by last month + sort posts
- If meta_key has value = 6 | Change the wp_posts.post_date to current date
- posts_per_page no limit
- Query posts: how to exclude results if post is in multiple categories
- query_posts ->using meta_compare / where meta value is smaller or greater or equals
- How to order posts by descending comment count on taxonomy page?
- Is it better practice to use query_posts, WP_Query, or get_posts to create various custom loops within a Page?
- WP 5.8 “Query Loop” block: where to place custom query?
- Pagination on archive.php page
- Best way to load page content in Fancybox popup?
- order post my meta value m/d/y format with year as included value
- _wp_page_template to dynamically use template
- Schedule Sticky Posts
- Total Count of Posts NOT in Selected Categories?
- how could I get the pagination as I want to when query posts using get_posts function
- Counter code for paginated category pages in wordpress
- Author List page: Exclude based on last post date
- WordPress Search Filter Only for Page with Child of Child of Child of Child of Child
- Filter query_posts by tag slug on “Tag Archive” page (when tag is 2 or more words)
- Warning: urlencode() expects parameter 1 to be string, array given in and not getting the preffered output
- How to modify the query to exclude posts by slug?
- post_status => publish not working
- Integrating post archive wtih another source and preserving date ordering
- How to fetch all posts in a category that were published between two given dates?
- get_meta_data within a loop
- how to exclude “featured” posts from the main loop?
- Show Only Posts Owned By Logged In User + my post
- pass query string on url to filter media
- Order posts by condition
- Co-authors plus problems with query_post
- Error sending array of inputs
- Custom MySQL Query with logic
- Search breaks when querying main loop for category
- trouble with query to fetch next and previous posts
- Adding conditional content to single post-type template
- Hook to return true when the_post() is used in a custom while loop
- Sort by page information by Ascending Numbers
- Query posts by meta_key whose value is an array
- How to remove a plugin filter’s priority on specific loops (custom queries)?
- Proper syntax to add boolean in array()
- Query posts to get all but the most recent post
- Always using the same ARRAY on different querys
- Currently using a query_posts() in my theme – want to use a request filter in stead
- How do I use pagination in WordPress?
- Breadcrumbs stop working on a specific template file
- Does WordPress run a post query when a page is invoked?
- change the default order of posts only for specific categories
- Multiple posts/pages in one page?
- Order for custom field after the loop
- Custom post query error
- Multiple instances of query_posts
- Different layout based on post amount?
- If Query Post Returns 1 Post
- How to check a list or feed of all posts under a category and tag?
- Keeping get_posts’ offset and is_paged() synchronized
- odd behaviours from template tags
- How do I add a timezone offset to this query?
- query_posts thumbnail condition
- Show posts from specific roles
- How to add an “or” instead of and “and” (&) in a WordPress query?
- Instead of 4 loops, how can I do it better?
- How to get any type posts include attachments by ids?
- Modify main loop query for paged and meta key
- wordpress query_posts featured page always on top
- Create a Loop with Posts Ordered by Most Recent Comments
- Need to add a space after meta value in query_posts in wordpress for zipcode search
- Tax query get first product with attribute value in pre_get_posts
- Specifying image size used in template the_content
- allow user to edit posts made by others users based on the user role
- Ordering Posts By Meta Data
- No duplicate tags by category
- Custome column sort by date not title
- Order posts by ACF checkbox
- query_posts with sorting on a custom datestamp
- Post per page not working
- Show previous month’s posts
- why is pre_get_posts not working
- query_posts result differs from wp_query request result
- How to get alphabetic listing x other posts, based on first letter post?
- Query posts based on parents attribute
- Adding Category Argument into an Array for WordPress Query
- orderby not working for query_posts using array of IDs
- Collect posts from last 48 hours
- The_content display a different content from a previous loop
- How to go to tag archives using a form
- Run second query on page based on author of the first query
- WordPress loop problem: Multiple loops, index.php and is_paged causing duplicate posts on next page
- Why doesn’t this page query work?
- Sort posts with multiple meta_keys
- How to get custom post type posts with certain multiple tags names and category id?
- Create “archives by year and week” by category template