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)
- Problem with serialized arrays in custom meta
- WP doesn’t show Array Custom Fields?
- How to save custom fields for attachments
- How to get a meta value from all post
- Adding existing user custom field value to a woocommerce product [closed]
- How to save values of a custom input field on the Network > Site Info screen
- Exclude custom post type from search by custom field value?
- add meta box using function.php
- How do I exclude posts by custom field value?
- How do I use wp_query for WordPress search?
- Nav Menu – Add class based on meta keys
- Eliminating the appearance of a specific custom field in a post
- Conditional custom field query
- Display two custom values from a post
- Accessing loop functions (e.g the_title or the_content) from post ID
- query usermeta from custom field
- Creating author profiles with extra fields and exporting that data?
- Removing link ” from ” on meta_value in custom feilds
- How to add a custom field in the advanced menu properties?
- Meta query with multiple custom fields for archives page ordering problem
- Custom Fields – How to create a list from multi-line entries of a single value
- How do I use “if field exists” with $curauth?
- custom field (video/audio url) and embed functionality
- How to validate select field in post meta?
- How to use pre_get_posts to alter posts_per_page of category pages, where ‘posts_per_page’ will be dynamic
- Displaying pages with a specific custom meta
- How to print the Custom fields values [closed]
- Comparing Dates from custom field
- How to validation for sanitize_URL?
- How can I output the custom fields wrapping with HTML
- How to get custom image field of specific post id
- wp_get_attachment_image_src() with advanced custom fields returning empty
- How to update custom field of a posts in a particular category
- Woocommerce products search with custom fields
- Convert author metadata to a custom field
- Custom pages or Custom Posts
- get_avatar filter is not working as per requirement
- Saving Custom Field that includes Quotation marks
- WordPress Admin – Automatically Sort Custom Posts by Custom Field Date Value in d-m-Y Fomat
- how to execute custom field for structured data?
- select user with all meta field and field value. I am use Below Query for this ,So any of know another way to fast query instead of below query?
- Retrieve Google API JSON data and store as WordPress Custom Fields
- meta_query ‘compare’ => ‘!=’ not working
- Why WordPress takes time to make request to save post?
- Show comon custom field results?
- Display Child Page with custom fields within Parent Page
- Pagination not displaying correct number of pages
- Show/Hide Featured Image or replace it with custom field [closed]
- Multiple permalinks for a single post from custom field
- Search for meta_query does not return any result if combined with title