have you tried to see template file at templates/events-list.php
http://wp-events-plugin.com/documentation/using-template-files/
Yes and I’m not sure exactly how the search is taking place.. It appears when you use the search for, it passes specific $args to the event list page, which then displays only the events which match those criteria.
Is there a way to search by only start date? Most of my events are going to be nightclub events, which means they go from 10pm one day, to 3am the following. The problem with this is, people search for Saturday, and don’t want to see all the Friday events that carried over.
I’ll keep trying but so far I’ve only been able to narrow it down to search one day, but auto-filling the end date field with what’s chosen in the start date, and hiding the end date field from view.
you can hide end date from template file events-search.php and then on events-list.php template you can add $args['scope'] = $_REQUEST['scope'][0]; inside if( get_option('dbem_events_page_search') && !defined('DOING_AJAX') ){
What I mean is to search by start date, but ignore end date. So if an event starts on the 18th, but carries over to the 19th, and you search on the 19th, it won’t show said event. it will only show events that START on the 19th
You code worked by taking the scope and instead of returning both start date and end date from the search form, it just displayed the start date. Thank you for that, it puts me halfway there. Now I just have to figure out how to alter the EM_Events::output ( $args ); to ignore all events that don’t start on the searched date. I was thinking a simple “if (event start date != search date) don’t echo” kind of solution but not sure where to alter the output…
SOLVED
events manager plugin folder “classes” and file em-events.php
add on line 162:
global $stop_now;
then on line 198 make it like this:
foreach ( $events as $EM_Event ) {
if ( !$args[‘scope’] || ( $args[‘scope’] == $EM_Event->event_start_date ) ) {
$output .= $EM_Event->output($format);
$stop_now = false;
}
else {
$output = get_option ( ‘dbem_no_events_message’ );
$stop_now = true;
}
Then line 216 add the if statement around the output
if ( !$stop_now ) {
$output = $format_header . $output . $format_footer;
}
I know it’s a dirty hack but i’m too tired to make it nicer right now and just excited that it’s fixed.
Please note this is after using aglonwl’s suggestion to add $args[‘scope’] = $_REQUEST[‘scope’][0]; inside if( get_option(‘dbem_events_page_search’) && !defined(‘DOING_AJAX’) ){ to the events-list.php
also note by altering a file in the classes directory, if you update the plugin you’ll have to go back and upload your changed file again. Be careful when doing this.. better to make the alterations to the new file if it was changed.