EventOn Search Results – Current and Future Events

Home Forums Product Support Forums Ajax Search Pro for WordPress Support EventOn Search Results – Current and Future Events

This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 1 year, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #42415
    dstevens2322
    dstevens2322
    Participant

    Hello,
    I wrote in last week and got a great response about limiting the search results to only future events. The plugin I am using for events is EventOn. You made me a custom code to place in the functions.php file, but I have one request. The search does not include anything from the current date. Can you help me add the option to show search results for events that show the current date and future dates?

    Thank you again,
    Danielle

    #42428
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    Sure! I think the timestamp needs to be adjusted to the beginning of the current day (from 00:00 AM), so maybe changing the code to this:

    add_filter("asp_query_args", "asp_query_args_apply_date", 10, 2);
    function asp_query_args_apply_date($args, $search_id) {
    	$args['post_meta_filter'][] = array(
    		'key'     => 'evcal_srow',
    		'value'   => strtotime("today", time()),
    		'operator' => '>=',
    		'allow_missing' => false
    	);
    	return $args;
    }
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.