add past events to search – genesis

Home Forums Calendar Products Events Calendar PRO add past events to search – genesis

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1043591
    designagency
    Participant

    hey there–

    i found this thread and thought it would have all i need to add past events to a search but no dice. im not as fluent in php as i might need be to figure it out based on that post.

    could you give me a few more hints on what i need to add to my functions.php file so that ALL past events will be included in a users search from the search bar?

    page is here: http://ath.design-agency.org/calendar/
    [removed by Josh 12/18]

    many thanks,
    emily

    #1043867
    Josh
    Participant

    Hey Emily,

    Thanks for reaching out to us.

    You can try adding the following to your theme’s functions.php file to see if this helps:

    
    add_action( 'tribe_events_pre_get_posts', 'custom_event_search' );
    
    function custom_event_search( $query ) {
    if ( is_search() ) {
    $query->set( 'eventDisplay', 'custom' );
    }
    }
    

    Let me know if this helps.

    Thanks!

    #1045347
    designagency
    Participant

    hi josh–

    i popped in the code you sent along, though it doesnt appear to have had an effect. i’ve refreshed my browser but still, no dice. not sure if this has any effect, but the site is designed using genesis.

    any other ideas?

    many thanks,
    emily

    #1049548
    Josh
    Participant

    Hey Emily,

    Thanks for following up with us.

    I’ve tested the code in the default Genesis theme and it appears to be working properly showing past events in the site’s search results. One thing you may want to verify though is that within your event settings, under the “General” tab, that you have the following option selected https://cloudup.com/c7ErqpJLrbI.

    Let me know if this helps.

    Thanks!

    #1076433
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘add past events to search – genesis’ is closed to new replies.