If you have store date different then timestamp it will be VERY hard to do this.
To get this if is timestamp stored, you need add “meta_query” like this:
add_action('pre_get_posts', 'my_pre_get_posts');
function my_pre_get_posts($query)
{
$offest = 0;// you must count this to avoid today and tomorrow
$query->set(
'meta_query',
array(
'relation' => 'AND',
array(
'key' => 'o_event_start',
'value' => time() + $offest,
'type' => 'numeric',
'compare' => '>',
)
)
);
}
$offest for 0:01 is easy 2*24*60*60-1 (two-days*24h*60m*60s – 1s ) for other you must cont from the current time.
Related Posts:
- pre_get_posts with tax_query causes empty result
- Main query disturb pre_get_post by category query
- Using pre_get_posts to rewrite search query to display posts from multiple taxonomies
- Include and Exclude Taxonomies From Archives & Feeds Using ‘pre_get_posts’
- Sort Custom Post Type Archive by Taxonomy Term [duplicate]
- pre_get_posts OR relation between taxonomy and author
- How to group by taxonomy on Custom Post Type archive
- Help With issue on pre_get_posts filter in taxonomy
- tax_query not working on main query
- How to redirect custom post type archive to first term of associated taxonomy?
- How to add custom taxonomy to search
- How do I get WordPress URL rewrites into Sitemap?
- Search by type posts and taxonomy
- How do I sort posts by custom taxonomy?
- Custom Taxonomy template is not recognised
- How do I Use Multiple Loops with WP_Query?
- Custom Taxonomy Template Error: Catchable fatal error: Object of class WP_Error could not be converted to string
- orderby meta_value breaks taxonomy term archives
- Get number of post who belongs in two taxonomies!
- How do I exclude posts from custom taxonomy from a custom post type archive?
- Automatically Give All Custom Post Types a Pre-Set Category [duplicate]
- WordPress Tag or Custom Taxonomy Return All Posts if has that Word in Post Title
- Custom Taxonomy Not Working When added to WordPress Search
- Removing “s” from search with custom parameters
- Why isn’t the ‘no results’ being shown when a query returns no results?
- Reverse order of posts in a certain taxonomy archive?
- Template file renders on local install, not on web
- Need equivalent of single_term_slug
- Amend taxonomy to search in wordpress admin
- is there a way of getting term children that only shows those from two taxonomies
- Add terms to a taxonomy archive from within the same taxonomy
- Random order not working correctly when using default loop + $query->set
- How to exclude woocommerece product category in search results?
- How to show category list in WordPress
- Pre_get_post custom taxonomy combined with custom fields?
- Change the Page Title of the Archive Page for Portfolio Tags
- index.php Not Showing Custom Posts / Terms
- Include attachments with a custom taxonomy in search
- Exclude 2 in 3 terms of A Taxonomy from all Archives
- stdClass::$labels /wp-includes/general-template.php undefined
- Using post type archive page for taxonomy archive
- Can I use $query->set() (in a pre_get_posts() hook) with a custom taxonomy in WP 3?
- get_the_terms inside save_post gives old terms
- add_rewrite_rule pagination 404 error on page 4 and above
- Querying posts globally based on custom taxonomy with its own taxonomymeta table
- Add custom display condition to Elementor Theme Builder for custom taxonomy children, grandchildren, and great-grandchildren
- Custom taxonomy with custom meta value is not sorting correctly (query returns the same value for orderby regardless of sort column click)
- Hide empty categories on widget
- Get term SLUG by term ID
- Custom Taxonomy Archive Page
- Get taxonomy names by post id
- restrict_manage_posts not working in 3.3.1
- Custom taxonomy only shows 0 in autocomplete for terms and “Choose from the most used tags”
- Nice URLs for a Custom Post Type List with a Shared Custom Taxonomy?
- Get terms of posts with category with sql
- Post slider with custom post type
- Help with a query not working with custom taxonomy
- Filtering more than one term in a taxonomy in WP
- Restricting Users to view only Custom Taxonomies they have entered?
- How to handle “the_terms” inside loop
- custom post type, hide or disable the trash button in publish meta box
- Display hierarchical subterms of custom taxonomy based on depth
- Date archive permalinks for custom taxonomy
- How can I hide admin columns showing extra custom taxonomy fields?
- Manipulate WP Query using a custom post type and multiple tax_query taxonomies
- Filtering posts by an already registered taxonomy
- How to filter a post in the Tag Cloud widget, using tags of a media library image attached to the post?
- How to separate posts in loop?
- Custom Taxonomy isn’t working from frontend post submitting
- Term and sub term from custom post type query [closed]
- Base permalink for custom taxonomy
- Rewrite rules for varying nested terms of custom taxonomy
- Copying taxonomy term to custom field
- How can I unregister a custom taxonomy?
- Problem with removing post tags programmatically
- Query custom taxonomy by term id?
- Get posts in certain Taxonomy terms for the current page url
- Get terms that don’t belong to current post with a shortcode
- {$taxonomy}_edit_form_fields not working
- How best to store data (URLs and IDs) extracted from posts and pages using custom taxonomies
- Custom taxonomy link automatically removing query string and re-directing
- Custom taxonomy filter for media
- How to create a custom template for custom taxonomy wp-tag-cloud?
- Find terms in a custom taxonomy based on the hirearchy
- Current taxonomy name (not term!) given a post ID
- Search box with field hidden till drop down selection is made
- 404 Error on Custom Post Type / Custom Taxonomy
- Prioritise Pages over Taxonomy Term Root Archive, but not Taxonomy Term Child Archives
- Custom taxonomy not showing in grid view for ‘attachment’ post type
- How to create archive pages for metadata query generated posts (so without taxonomy)?
- How to get list of custom taxonomies based on custom post type
- how to filter the data’s comparison operators (>= &
- Custom taxonomy rewrite in permalinks for posts gives 404 on pages
- Query pages by child term
- Custom taxonomy applied to links [duplicate]
- Custom Taxonomy registered with multiple custom posts
- Insert term description programmatically into hierarchical custom taxonomy
- Get all taxonomy posts by id
- Rewrite URL for a specific taxonomy [duplicate]
- Template hierarchy html with taxonomy in 6.2