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?
- Query to sort a list by meta key first (if it exists), and show remaining posts without meta key ordered by title
- How to Change Order of Posts in Admin?
- Sorting a query by custom field date
- Auto sort the wp-admin post list by a meta key
- Ordering Posts List By Taxonomy Terms?
- How to order users alphabetically by their last name?
- Number of pages – multiple (custom) post types
- WP_Query -> sort results by relevance (= most tags / taxonomy terms in common)
- Drop down+sort blog posts date added/most popular
- How can I sort get_users() by any value (last_name, user defined fields and more)
- Sort a custom post type array numerically
- How do I sort a custom post type admin column using two meta keys?
- Search results sorted by post types
- wp_list_pages sort order is different for different languages [closed]
- Sorting and limitation with pre_get_posts
- How to show the entries in a custom taxonomy by author?
- Use pre_get_posts to sort meta_key by an array of values
- Sorting Media Library by Author Name
- Admin Taxonomy Terms – Orderby Term Field
- Categories sorting
- Wp_query: sort by PHP variable
- Crafting WP_Query array, sort by date
- How to sort by columns within a search result without displaying all rows again after sorting
- Sort and filter custom post type posts by custom taxonomy
- manage_edit-{post_type}_sortable_columns sorts, but wrong!
- Change the sort order for posts to include custom field
- WP Group posts by year(desc) > month(desc) > date(asc)
- Count the posts number for every category
- Sorting tags by name
- Rename WooCommerce sorting dropdown options [closed]
- Sorting products by price ( regular + sale price )
- Sort and paginate custom post taxonomies alphabetically
- sort by name (slug) custom post type
- Add multiple orderby with pre get posts
- Sort query_terms_list for post_tags alphabetically
- How can i sorting and display image order by siz in media library?
- Sort custom post type by custom datepicker instead of filtering
- How to order blog posts by no. of likes?
- Pin to Top Functionality using orderby custom field then event date
- Wrap group of wp query posts to parent div by date/year
- Add Sort Link in Custom Post Type List
- ISOTOPE – Missing/Invalid Arguement Get Terms
- Query posts alphabetically within this function
- Filter/Sort Post Form On Taxonomy page
- Custom order of CPT posts by title, in wp-admin area by default