You can use your current code to create the query and then in your loop run a check before displaying the events something like
<?php
query_posts('meta_key' => 'end_date_value', 'meta_compare' => '>', 'meta_value' => $todaysDate);
while ( have_posts() ) : the_post();
$post_custom = get_post_custom($post_id);
if ($startDate < $post_custom['start_date_value']){
//your loop here
}
}
?>
keep in mind that this is not well coded way to do this ,I would probably create a better sql query or use “posts_where” hook.
but its a start
Related Posts:
- Get previous posts list
- About WP’s save_post action
- How to Optimize WP site for millions of posts
- Get Terms by IDs with IDs order
- How many WordPress SQL Queries per page?
- Slow wp_enqueue_media()
- Advanced Custom Fields – Query Efficiency
- How to display lastest post date in the homepage?
- $query->query_var[‘post_type’] not set for pages
- Show recent products first but “sold out last” in query
- How to tell if $query_var isset?
- Sorting Grids with Essential Grid and Events Manger
- The use of including upgrade.php when building custom queries
- Get the timout value of a saved transient?
- Does meta_query work within get_posts array?
- Slow meta_query with about 4 milion record on wp_postmeta
- How do I query for a post by custom field?
- How to show more than 5 posts?
- WordPress Find Duplicate Post By Content
- How many queries are normal to execute on a WP site?
- WP Query Sort by meta value (date)
- mySQL query. ORDER BY meta_key
- how to query multiple categories in wordpress?
- Disable the MySQL query in the main query
- Strange string in console from wpdb query
- Update slug (URL) of pending posts via phpMyAdmin
- How can I get the query that would be run for the archive page?
- Error when using setup_postdata()
- Query metas (and not : query posts by metas)
- Select query for a login
- What’s wrong with my $wpdb prepare?
- How can I sort homepage by a meta value?
- $wpdb query a post type within a specific taxonomy term while ordering posts by custom meta value?
- where should I reset query after using get_results?
- Exclude featured image and custom field from this get_attachment query
- query in category.php repeats itself
- SQL query to select posts from multiple categories
- Select Query demand excesive resources [closed]
- wpdb print all post meta
- Form and custom query problem
- Export Specific User data without plugin
- Create Indexes for Slow Queries
- Why orderbyb meta_value_num won’t affect the generated SQL Query order?
- I want to create a filter for the query string is this possible?
- How to write: $wpdb->update having WHERE NOT value pair in the array
- Exclude categories from the_category();
- How can i show all categories using wp query?
- Exclude all sticky posts front page twenty twelve
- Query returning same results even though the ID changes
- Why my query ‘REPLACE INTO…’ does not work?
- Restrict query to last day with posts
- Custom query object with Simple-Fields custom date field
- How to read the value of a WordPress $query associative array (hash) key
- Random Page Rewrite
- Query posts based on previous query
- Waypoints + infinite scroll with custom query
- Customizing the_tags output?
- Filtering custom posts by custom fields (ACF) [closed]
- Querying with WP query using meta key price
- How to pull posts into two columns with different image sizes using $counter variable?
- Re-sort get_posts query results
- How do I get all results from my query
- Taxonomy filter under Polylang
- How to create an overview of posts with the same tag?
- Custom Query: query by post custom meta data
- create a link to a random post within the current category
- Query pulling a single post per month
- Pagination not working on custom post types with rewrite slug
- JetEngine Query Builder – order by value from repeater
- Change pure SQL database query to WordPress post query?
- Search & column order by meta value in admin
- Filter orders by modify date
- How to add url parameter to every search query in SearchWp?
- Order posts ascending from posts in array
- Display data from phpMyAdmin with WordPress
- Heavy meta query causing SQL crash
- Sort by postmeta on when searching
- Pulling an ACF into a query
- Speed up search query that searches in post meta?
- Category_in return empty
- Querying users by meta value and getting a strange answer
- Loop through multiple custom fields with increasing number
- Using cron for multiple queries
- very slow wordpress query with default query
- $wpdb: how to use a query as a base for another query?
- Custom Query problem access the values
- Set posts per page for parent category and it’s all children
- Exclude sticky posts from query
- If more than 1 image show post link?
- Rewrite Query_Var URL Parameter with Slug
- How to query different categories on index?
- How to specify what kind of is_single post?
- Can’t See Media Queries with Inspect Tool [closed]
- Print data from wordpress sql query
- What is the best way to cache pages and queries in WordPress?
- Can I create my own query in wordpress with traditional methods?
- How do I troubleshoot Maximum execution time of 60 seconds exceeded in updating a Media File?
- update $wpdb one query
- Admin Post List table Query filtering “WHERE” for custom post type
- How to use a dynamic term id for the query block