I’ve used Jared’s approach several times successfully, although I agree that Stephen Harris’ answer should also now work (but it’s a more recent addition to WP_Query which wasn’t available at the time I was building an events listing). Depending on the date format you are suing to store the date, you might also need to use something like the following to display the date properly (this is probably basic if you come from a PHP background, but it had me stumped for a while).
<?php
$course_start_date = get_post_meta($post->ID, 'start_date', true);
$fixed_date = strtotime($course_start_date);
echo date('jS F, Y' , $fixed_date) ;
?>
Related Posts:
- visually sort ordering “custom post types” for end users
- Custom Table Column Sortable by Taxonomy Query
- How do I allow users to sort posts? [duplicate]
- Sorting results from JSON-API on custom fields
- Sort users in get_users() in custom order
- Sort by custom field value
- How to sort posts with the first 2 or 3 by latest, and the rest is random?
- Get “wp_get_nav_menu_items” to sort alphabetically [duplicate]
- Ascending sort order for monthly & category view, i.e. ?m=201204, ?cat=4
- Adding Sorting to Website?
- Sorting by tag or category
- get_terms orderby name as numbers
- Creating a category page by alphabet
- Sorting get_post_ancestors array
- wordpress custom_meta ordering of timestamps
- Multi-level ordering in WordPress
- Sorting for custom column in WordPress admin post table
- Help alphabetically sorting $terms from get terms(‘wpsc_product_category’
- Vertical alphabetically post columns
- Advanced custom fields sort repeater by date
- Displaying posts sorting by a custom criterion
- Sorting custom post type by usermeta
- Sort posts by meta key that is serialised with other meta keys
- orderby field – list of available options?
- User Query sort on custom field then name
- WP Query sort by meta value
- Best Practices for a Completely Customizable Homepage – without plugins
- Sorting posts by custom field value
- How do I create a sort capability by Title, Category, Author, Date?
- How to avoid duplicating same meta_value?
- Sorting/Filter posts from front-end in WordPress blog
- ‘sort_column’ => ‘menu_order’ not working
- Sort scheduled posts in ascending order by default
- How to sort by number
- sort items by randomness
- inner foreach loop sorting
- Sortby parameter to sort users
- Update meta_key value for a page
- Table Sorter sort by span title?
- make two custom columns sortables
- How to display remaining post ( in post__in ) if posts are less then post per page?
- ACF pro: Group teaser by datepicker year and display custom sub fields [closed]
- Sorting in WP_List_Table class
- Sort an array with an ACF meta key
- display wordpress user who published a pending post of another user
- Static front page and orderby
- Advanced sorting of content in wordpress [closed]
- Sort posts by first content letter
- Grouping posts starting with same letter
- Getshopped (WP-e-commerce): show all protucts on one admin page for drag-and-drop ordering [closed]
- List CPT by menu_order with children right after parent
- Multidimensional array sort?
- How can users sort multiple pages?
- How do i Sort my Posts
- How to resort my id in wordpress?
- Sort Featured Content by Order instead of ID
- Can the Next/Prev Post links be ordered by menu order or by a meta key?
- Query to sort a list by meta key first (if it exists), and show remaining posts without meta key ordered by title
- Sort results by name & asc order on Archive.php
- How do I set the default admin sort order for a custom post type to a custom column?
- Ignoring initial articles (like ‘a’, ‘an’ or ‘the’) when sorting queries?
- Make custom column sortable
- Sort pages in loop by admin’s page attributes order field?
- How to Change Order of Posts in Admin?
- Orderby meta_value only returns posts that have existing meta_key
- Using meta_query, how can i filter by a custom field and order by another one?
- Sort admin menu items
- ORDER BY custom field value
- Sorting: custom query with orderby meta_value_num THEN by title
- How to query_posts using meta_query to orderby meta_key AND have a secondary sort by date?
- group search results by post type?
- register_post_type sort order by title by default
- Random sort within an already sorted query
- Different post sort order within different categories
- sort child pages on admin
- get_pages() not ordering as it should
- Drag n Drop Post Order for multiple Custom Post Types
- Sort custom post type list table by display name of a user id stored as post meta value
- Setting Custom Sort Order of Posts within a Category
- Plugin for custom sort order for categories?
- Custom sortable columns ordered by meta-value?
- Sort plugins by rating
- Sorting search results by taxonomy terms
- sortable custom column in media library
- How to return results of a get_posts() in explicitly defined order
- Adding meta_key via pre_get_posts causes navigation to disappear
- Can I force a metabox to be in one column?
- Sort posts by category name and title
- How to get order of posts?
- How to order adjacent posts (prev / next) by custom field value?
- WordPress post sorting with AJAX
- initial sort order for a sortable custom column in admin
- Ordering posts by custom taxonomy in admin area
- How to get Page/Post Gallery attachment images in order they are set in backend using WP_Query()?
- WP Query orderby meta key natural sort?
- Custom Post Type, WP_Query and ‘orderby’
- Sortable admin columns, when data isn’t coming from post_meta
- Filter admin columns by custom post field value
- Sorting a query by custom field date
- How to Group Posts by the First Letter or Number?