crabbycrabbersen
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
I have a custom coded form on the page to search for events, entering a keyword and/or start/end dates. With the form’s values, I’m querying the events as follows:
if ($date_from = $_GET['date_von']) { $cd = explode('-',$date_from); if (!checkdate((int)$cd[1], (int)$cd[2], (int)$cd[0])) $date_from = ""; } if ($date_to = $_GET['date_bis']) { $cd = explode('-',$date_to); if (!checkdate((int)$cd[1], (int)$cd[2], (int)$cd[0])) $date_to = ""; } $args['limit'] = 10; $args['search'] = urldecode($_GET['s']); $events_count = EM_Events::count($args); $args['offset'] = (isset($_REQUEST['pno'])) ? $args['limit'] * $_REQUEST['pno'] : 0; $args['page'] = (isset($_REQUEST['pno'])) ? $_REQUEST['pno'] : 1; if ($date_from) if($date_to) { if($date_from > $date_to) { $t = $date_from; $date_from = $date_to; $date_to = $t; } $args['scope'] = $date_from.','.$date_to; } else $args['scope'] = $date_from.',9999-01-01'; elseif($date_to) $args['scope'] = date('Y-m-d').','.$date_to; foreach (EM_Events::get($args) as $EM_Event): $WP_Event = get_post($EM_Event->post_id); //display event
Thanks, but that didn’t seem to have influence onto the ::get method…
I’m on my theme’s single-location.php which displays one location.
If I fetch
$location=em_get_location($post->ID, 'post_id'); print_r($location);
,
I get the correct title, but the location id is empty.I’m still stuck with this one.. How to get the location’s id on the location’s detail page?
Viewing 4 replies - 1 through 4 (of 4 total)