Assuming, as per the above comment, the format of the dates is YYYY/MM/DD
:
$args = array(
'posts_per_page' => 1,
'cat' => 6,
'meta_key' => 'begin_date', // adjust to actual key
'meta_value' => date( 'Y/m/d' ),
'meta_compare' => '>=',
'order' => 'ASC',
'orderby' => 'meta_value'
);
$wpse72195_query = new WP_Query( $args );
// do something with the result
Related Posts:
- Custom query with orderby meta_value of custom field
- Query Posts or Get Posts by custom fields, possible?
- query_posts and only show results if a custom field is not empty
- Convert jQuery Datepicker Format to SQL Date Format
- Filter archive.php by custom meta
- Date, Time, and Timezones
- Order posts by custom field and if custom field is empty return remaining posts
- Query on custom field count?
- How to use query_posts() with a date filter on a custom field?
- How to filter a dd/mm/yyyy date from a custom field in a query
- custom field value date convert to unix timestamp problems
- Compare WP Custom Field date
- meta_value_num sort glitch
- Can ordering post list by meta_value cause performance issue?
- Order by value in serialized custom field
- Author Page Custom Query WHERE author OR [post meta value] OR [post meta value]
- How do I query for a post by custom field?
- converting custom field date format
- meta query not showing any results?
- how can i use custom field in query post
- using multiple meta_key and meta_value in query_posts
- Query post order by post and desc not working
- How can I sort homepage by a meta value?
- Order query by meta_value with multiple custom fields
- How to select posts from multiple categories and metavalues?
- meta_compare seems to be treating values as strings instead of integers as expected
- Change order of posts
- filter custom field values $min $max
- query posts custom field calculation value
- WP Query – Is this correct?
- Query_posts with custom field meta value
- Unable to get specific value from post meta
- wp custom field date format compare
- Meta_query ‘compare’ => ‘LIKE’ not working?
- query_posts with meta_value
- Custom search SQL Query to add custom field in result
- Incorrect ordering of custom post type based on time
- How to put forward a blog post
- How do I convert all custom_field php timestamps in the database to js timestamps?
- How can I change the publish date based on a custom field?
- How to show certain data on certain interval of period
- Get author total post votes from post meta
- Problem with writting correctly a query posts args in WordPress
- simple fields plugin custom query
- Custom Field Date Problem
- query_posts -> get page_id from custom field
- Checking if field is set before comparing with meta_query in query_posts?
- Filtering posts by WORD in custom field
- Display agents (custom post type) alphabetically, except one who always shows last
- Filter Query Post by Custom Fields(by date)
- get_the_ID() retrieves same ID on Gutenberg’s Query Loop
- Advanced Custom Fields: how do I check to see if a value is set in an field? [closed]
- WP_Query – Order results by meta value
- Add filter menu to admin list of posts (of custom type) to filter posts by custom field values
- getting all values for a custom field key (cross-post)
- How to add a custom field in the advanced menu properties?
- How to filter post listing (in WP dashboard posts listing) using a custom field (search functionality)?
- what is the correct way to compare dates in a WP query_posts meta_query
- Using meta query (‘meta_query’) with a search query (‘s’)
- Can I exclude a post by meta key using pre_get_posts function?
- Add validation and error handling when saving custom fields?
- Query to sort a list by meta key first (if it exists), and show remaining posts without meta key ordered by title
- Show Custom Fields in Quick Edit
- Where are custom field values stored in the database
- Validating Custom Meta Box Values & Required Fields
- Max length of meta_value
- Add custom fields to wp native gallery settings
- How to fix missing custom fields after upgrading to WordPress 4.8.1?
- How to enable custom fields for pages (if not a bad practice)?
- How can I add extra attribute in the ‘Page Attribute’ section in wp-admin for pages?
- Is there a way to set default custom fields when creating a post?
- Custom post meta field effect on the performance on the post
- How to get custom post meta using REST API
- Custom field/meta populated by dropdown of existing posts?
- Difference between meta keys with _ and without _ [duplicate]
- Is there any action filter/hook for validating a custom field before publishing the post?
- Remove Dimension from wp_get_attachment_image
- Orderby meta_value only returns posts that have existing meta_key
- Underscores in custom fields
- What is the index [0] for on post meta fields?
- Using meta_query, how can i filter by a custom field and order by another one?
- Order by meta value or date?
- What is “meta_input” parameter in wp_insert_post() used for?
- How to enable revisions for post meta data?
- Sortable Custom Columns in User Panel (users.php)?
- Any way to add custom options to Gallery Settings?
- Return all custom meta data for one custom post type
- The “_encloseme” Meta-Key Conundrum
- ORDER BY custom field value
- Individual Widgets per Page
- Add subtitle to Woocommerce product title
- Best way to programmatically remove a category/term from a post
- Importing data for advanced custom fields plugin?
- Gutenberg add a custom metabox to default blocks
- SQL Query to copy value of a meta_key into another meta_key
- ‘Preview Changes’ for custom meta boxes?
- Adding a custom field to the site identity menu
- Using TinyMce with textareas in meta boxes on custom post types
- Filter WP_Query for posts having a certain meta-value
- How to correctly call custom field dates into a posts_where filter using SQL statements