Save your data in a single field as either YYYY-MM-DD
or UNIXTIME. Then query like this:
$args = array(
'post_type' => 'POST_TYPE_NAME',
'meta_key' => 'date-key-name',
'orderby' => 'meta_value',
'order' => 'ASC',
);
$query = new WP_Query( $args );
You should get an order, unless I am having a bad morning, of Day -> Month -> Year, which I believe is what you want. I don’t have your data at hand so I can’t actually test that.
Related
Related Posts:
- Custom post type – order field
- Why is get_post_format() for “Standard” returns empty
- Password-protect a custom rss feed
- Group search results by post type, but hide post types with no results
- WP_Query post at custom position
- WooCommerce – Show orders for a specific product ? [closed]
- Integrating Orbit slider into wordpress through custom post type
- Is it possible to place custom post type files inside a folder in theme directory?
- Get term name and term parent into custom post type permalink
- What is the recommended / best way to do this: Event calendar post/type in a block-based theme?
- Return the latest post from a custom Taxonomy and Post Type
- 4 column-loop ordered alphabetically with entries grouped (and labeled) by their first letter
- Custom WP_Query doesn’t display all posts
- Specify a particular page to list all custom types
- Two column layout with alphabetical ordering
- WP_Query with custom post type ID
- Having Issue on Ordering CPT by Custom Field In Custom WP Query
- Template Hierarchy for custom post type pages
- Should Custom post types and fields be in the theme files or in a custom plugin packed into the theme?
- Assign a template to a custom post type when displayed by the main loop on the home page
- Custom Post type content within a slider
- Methods for development wordpress themes [closed]
- Custom Post Type – Main page for certain posts
- Changing WordPress sort order for returned child pages
- How to Enable Ascending or Descending In WordPress Default Built-in Loop
- How to display posts from a certain category in a bootstrap 5 carousel loop with multiple items?
- Loop all post on single.php
- Order posts alphabetically with numbers but some of the posts has numbers in the title
- Add extra elements to the_post in a custom post_type
- SEARCH QUERIES – REVERSE OUTPUT
- Custom Post Type has wrong label and is not found when called by a loop
- 2 custom posts types, in their own columns, one pagination for both
- Custom post type with custom taxonomy permalinks
- Custom taxonomy page template
- Cant insert wrapper div into index.php
- erase post excerpt limitation [×]
- Query custom post type and showing its content
- Custom Post Type Order Index Loop
- Change position of Post Formats box?
- How to manage wordpress knowledge base/wiki/posts collections
- How to create custom page templates with default page layout framework?
- WordPress search results grouped by post type
- REQUIRED: The theme uses the register_post_type() function, which is plugin-territory
- Should I use custom menu, C.P.T. or theme options, or something else for this?
- Only show posts from a certain category?
- Very Slow Page – How to Optimize # of Queries?
- Change or update WordPress loop based on dropdown selection
- get_template_part and template file names
- Can I create a loop with multiple post types and specify different $args for each post type?
- Combining sorted and random CPT
- Custom template with CPT doesn’t display on frontend
- Display CPT posts based on specific taxonomy
- Creating select dropdown with parent-level custom post types
- Show listings from Impress Listing plugin in random order using taxonomy and terms
- How i can add ‘N’ page of ‘N’ pages under posts loop?
- What’s the difference between same wp functions get_posts(); functions in different form?
- WordPress Genesis custom taxonomy archive shows 3 repeats of each post
- I did group my search results by post type, but how can i give each of them its own order?
- Ordering posts in Search & taxonomy by post_meta
- One-to-many post relationships that are displayed by category (using posts-to-posts plugin)
- WP_Query orderby modified to include custom meta changes
- Custom Post Type Loop throws 500 error when used in widget
- Am unable to reset a query properly
- Create a wordpress test-system as a clone from productive system
- Why orderby=”date” does not support manually changed posts?
- get_attached_media() on author page not working
- How to make sure content doesn’t display if selection is empty
- What template files do I need to customise custom-category-term-links rather than fall back on archive.php?
- Show one item per category of a custom post type
- Two near-identical custom field types – one works, the other doesn’t . What can cause this?
- Meta Key Value in current-user-only loop
- How to display all posts from standard posts to custom post types in a loop with pagination?
- Calculate all custom field values in the post loop
- Rewrite and custom post type: order by custom field not working
- CPT + CMB2: data not displaying for only first post in loop
- Get next and previous 3 posts in a term in single post page
- How to set order for a custom post type
- Previous/Next Link by Meta Value in CPT
- Loop custom taxonomy to get lists of cutom post types?
- How do i calculate the total of values of custom fields in custom post types?
- Multiple Loops On Custom Post Type Template?
- How to order separated Custom Post Search results
- Wp_query: sort by PHP variable
- Allow user to set custom order to a list of custom taxonomies?
- Custom loop with multiple taxonomy queries
- I would like to have different styles for my posts based on the content of each post
- Checking if Post Title is Unique as Loop Criteria
- Custom post type not displaying content from single-{custom post type} page
- Allow non-logged in users to see a future post after clicking on a list of future posts
- Custom post type multiple loop by taxonomy term
- Help need making decision. Ads rotating site on wordpress
- List custom taxonomy specific to one custom post type
- Query & Order posts by custom fields
- Show a Category X’s custom post type on Category X archive page?
- Paging doesn’t work?
- Sort by alphabetical order archive.php page
- custom taxonamy and post type
- Custom Tag Description unable to display just below and outside of the Loop
- Display all taxonomy terms, add class if term applies to current post
- Sort CPT archive by order prevents sorting in admin