Display posts with a start OR end date later than current date

Edit: I believe my comments below are still valid, but I suspect part of the problem is the ‘relation’ => ‘OR’, This should be ‘AND’ (it’s default value,so it can be removed) to ensure that it only returns posts which satisfy both conditions. Currently it will return events that start, or end, after yesterday. In … Read more

Only show upcoming event or current events

your are comparing time against wrong time string: change: ‘meta-value’ => date(‘Y-m-d’, strtotime(‘-6 hours’)), //value of “order-date” to this ‘value’ => date(‘m-d-Y’, strtotime(‘-6 hours’)), //value of “order-date” because your time string is in m-d-Y format and you are check against Y-m-d which is wrong. NOTE if above trick doesn’t work then i suggest you to … Read more

scrolltop always 0, can’t trigger script

I guess body.scrollTop is deprecated in strict mode. Please use documentElement.scrollTop if in strict mode and body.scrollTop only if in quirks mode. So I would suggest you to use document.documentElement.scrollTop. also let us know when are you using this statement? show us full code and your console error if possible Please try the below code … Read more

Event-Driven Pattern vs MVC?

I will try to explain it simplest as i can: MVC Framework – Is a framework, that uses MVC software architectural pattern. This pattern sepatares logic in Controller, data in Models, and HTML code in Views. This 3 are separated in different files, so code is cleaner. Event Driven Pattern – Is a software architecture … Read more

How to display upcoming events by dat with Modern Events Calendar Lite

i have found a solution, making a custom SQL query here is the code ( using WPML ) $startday = date(“Y-m-d”); if ( defined( ‘ICL_LANGUAGE_CODE’ ) ) { $lang = ICL_LANGUAGE_CODE; } //echo $startday; global $wpdb,$post; $results = $wpdb->get_results( “SELECT * FROM wp_posts, `wp_mec_dates` AS mecd, wp_icl_translations WHERE wp_posts.ID = mecd.post_id and post_status=”publish” AND wp_icl_translations.language_code=”$lang” … Read more