So what you need to do is order it by the custom value of the meta_key date value.
Something like this (untested):
$wp_query = new WP_Query( array(
'post_type' => 'upcoming_events',
'order' => 'ASC',
'meta_query' => array (
array (
'key' => 'your_custom_date_key',
'value' => date('Y-m-d')
)
),
'orderby' => 'meta_value'
)
);
Hope that helps.
Related Posts:
- Unable to check if plugin is active
- Creating 20,000 Posts or Pages using a .csv file?
- How to get current post ID in Contact Form 7 wpcf7_before_send_mail hook action
- Using Advanced Custom Fields with WordPress and Lightbox
- Search and replace text across all posts
- How to store ACF custom fields data in a custom table
- Bad Request (Invalid Hostname) on working server, database problem
- Edit Imported advanced Custom Fields from wordpress Dashboard
- ACF for audio url in wordpress audio shortcode
- Help!! I Screwed up my WP
- $wpdb->get_results() does not fetch results with unicode ‘WHERE’ clause
- Custom field in TWIG template – Advanced custom fields plugin
- How to create Repeater fields using Advanced Custom Fields?
- Loop with array of posts using ‘Advanced Custom Fields’ plugin [closed]
- wordpress in nginx docker container connected to php:8-fpm container and mariadb container isn’t creating any tables on plugin activation
- Advanced Custom Fields/User Role Editor – how to hide ACF for certain users?
- Last modified field for user profile?
- How to determine what is generating large amount of database queries?
- mysqli_error() expects parameter 1 to be mysqli, null given in own db class
- Getting value from Advanced Custom Fields [closed]
- How can you include a theme template file from within a plugin (i.e. WooCommerce’s Shop page)?
- Pull out Advanced Custom Fields in Related post plugin
- Help With MySQL to WPDB Query Conversion
- Using a post-signup hook to get user details
- Matching Chapters to a Custom posts [closed]
- join 2 table orders wordpress plugin
- How do I run SQL queries on a WordPress web page? [closed]
- Enabling WP_USE_EXT_MYSQL to support old plugin
- how to access all user dashboard on fronted page [closed]
- SQL to order by CPT results by user->display_name w/only user->ID known
- Enabling plugin failed because MySQL user do not have CREATE permissions
- WordPress page and plugin list using sql query
- Paid Membership Pro with ACF [closed]
- Errors when trying to use a plugin to write to the database
- _prime_post_caches in wordpress
- pagination on data fetched using SQL query
- Advanced Custom Fields – Disable Users to Edit Custom Fields
- Speeding SQL queries for a large database?
- Mass SQL WordPress Meta Key deletion
- Using ACF default value to autoincrement a number field
- Advanced Custom Fields – Get value in other plugin file [closed]
- dbDelta not adding additional columns in plugin database update
- Using ‘mysqli_connect’ ‘crashes’ WordPress client-side
- Remove Advanced Custom Fields plugin for client?
- Adding class to last list item? Not WP generated
- How can I fetch data from another website to my wordpress website with mysql database
- Getting error “Warning: mysql_query(): Can’t connect to local MySQL server through socket ‘FILEPATH/cccatalog-plugin.php on line 1656”
- External wpdb connections in different plugins on single page
- ACF – How to set the menu order for the relationship field
- Conditional custom redirect
- WordPress plugin: efficient way to store large data
- Plugin generating unexpected output – on WP mysql dump import
- Translation to ACF relationship field
- WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version [closed]
- Can’t create tables with my plugin
- Integrating Custom Database with WordPress
- Check against server time to display SQL entries – Radio Station DJ Rotator Plugin
- WordPress Cache delete on plugin uninstall
- How to create repeater field manually, without plugin (ACF Pro)?
- Replace the_content with ACF Flexible Content via function
- how can we migrate wordpress 5.9 website from aws ec2 to new installed wp 5.9 oci compute
- JOIN and SUM different statement results (Mailster Database)
- Some error in mysql script ? Can’t working to create table
- acf backend error handling
- How to get the custom field value using SQL query
- Setting Author on CPT
- Need to know if my approach to designing a geneaology plug-in for wordpress makes sense
- WP Function does not trigger on Webhook API Call
- I created a plugin with ‘view page’ that uses MYSQL + PHP. When I use wp_insert_post(), it turns everything to HTML
- Performing CRUD operations on front end in wordpress
- Display a number value from mysql query in WP
- Why Custom fields description is not working WordPress Version 5.4.2?
- Images are broken in Wysiwyg Editor – ACF backend
- make p tag collapsed after 3 rows
- How do I change the functionality of an image slider which is part of ACF?
- Store GravityForm data in phpmyadmin (mysql)
- WordPress database problem wp_posts, primary key
- How much PHP and MySQL or MariaDB knowledge should I know to start writing WordPress themes and plug-ins and whatever else a beginner can edit?
- Change the color of ACF Subtitle output background
- Will downloading a page builder plugin delete my existing data?
- Get a Taxonomy values in an array
- get/show Last ID
- HyperDB failover Delay
- Re-writing MySQl query for execute faster
- Create Database Tables on Plugin Activation hook
- Write mysql credentials in plugin
- Help with sorting and storing data on WordPress
- Slow WordPress admin panel with a total query time of 1664ms
- Linking Plugin Files to WP
- MySql Query for WordPress
- Using wp config to connect to a DB from a plugin
- ACF: Hide a div or template section when a custom field (in a field group) is empty
- How ACF Advanced Custom Field works with Woocommerce Single Product [closed]
- How can I delete the options from DB when the plugin is deleted?
- Getting 504 Gateway Timeout Error on AWS Server! [closed]
- WordPress issue – data is not showing in wp-admin, but when searching through database, all the data is there
- Advanced Custom Fields (ACF) and their Javascript API
- WP_Query does not return the result even if the data is present in the database
- WP Plugin: How to avoid db access for each comment?
- PHP Fatal error: Cannot redeclare distance() when making a new block