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
- Pagination not working with custom loop
- Display all posts starting with given letter?
- wp_pagenavi() with custom wp_query()?
- Custom Search form not working in localhost
- Should unaltered default loop/query return a list of custom posts belonging to a custom taxonomy?
- 404 error PageNavi custom type taxonomy | wordpress
- Multiple Content Block
- Query for posts in 2 taxonomies
- IF statement in a do_shortcode
- Display custom post types with custom date field value (before today) & order by custom date field
- How do I create an archive page for standard posts?
- Remove parent from custom post type
- How to check if “is single” page
- Using pre_get_posts to filter one loop in a multiloop archive
- How to Get Current Custom Post Type Selected Taxonomy Term (Not All Terms)
- Combining sorted and random CPT
- Loop custom taxonomy to get lists of cutom post types?
- Allow non-logged in users to see a future post after clicking on a list of future posts
- Query & Order posts by custom fields
- Show a Category X’s custom post type on Category X archive page?
- Sort by alphabetical order archive.php page
- How to Upload CSV Data into Custom Post Type Data with Metabox programmatically
- Displaying Custom Posts on a Page
- Wrapping x posts in html without leaving empty html
- Post loop count is not in order
- How can I use the WordPress Loop and Pagination in multiple instances but different scenarios throughout my site?
- Api rest_route 404 while building filter for custom posts (filtered by multiple meta keys / custom fields)
- how to get this tax_query working?
- hide specific div on single.php [closed]
- why post_class() function apply css classes to all other files?
- Looping Through Categories of a CPT
- How do you output an unknown number of images in a custom post type with desired markup?
- Custom post type’s posts are not showing anywere but in xml sitemap
- Custom Post Type – Portfolio no longer works
- If Post type use sidebar (‘tree’)
- Having Issue on Getting Metabox Checkbox Value
- Displaying information from custom field on custom post type
- Display only a single CPT
- Control Loop Within Loop
- How do I enforce a specific custom post type on the loop
- Show the categories the current post has
- Pagination not working in custom post type. Help
- How to use posts as tabs in a custom page?
- Problem with multi checkboxes value in metabox?
- WordPress trying to query two custom types to get child from the parent
- Display title of all custom posts from same taxonomy term on a custom post template
- How to sort custom post’s category by id from the theme’s function.php?
- WordPress query in which condition uses custom field
- Change Background Color For CPT Template
- Show first posts with custom field not empty and order all by title
- WordPress add taxonomies/terms list as a menu in archive page
- Issue on Counting CPT’s Under Taxonomy Term
- Pagination not working with custom loop
- wordpress taxonomy results
- Custom Post Types and 404 Pages
- Single page for Custom Post Type not found
- Meaning of “if ( is_home() && ! is_front_page() )” snippet?