Custom Search for events

Home Forums Calendar Products Events Calendar PRO Custom Search for events

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #16812
    Hunter
    Member

    I have a search form on the gridview page.

    <form role="search" method="post" name="searchform" id="searchform" action="”>

    Keyword:

    events

    in Category
    true,
    ‘name’=> ‘tribe_events_cat’,
    ‘taxonomy’=> ‘tribe_events_cat’);
    wp_dropdown_categories_test( $args )
    ?>

    between

    and

    Search Events

    In the list view, I am taking the start and end dates from the search to get events in between those dates with this code.

    = $start_date_search && $end_date_event

    = $start_date_search && empty($tribe_events_end_date)): ?>

    Any ideas as to why it just shows events from the current month. If I do not enter a start and end search date, all events show normal. If I enter a search date in october it shows none, when there are events there.

    #16813
    Jonah
    Participant

    Hi Hunter, our code posting sucks right now but we’ll be improving it soon. For now use pastie.org or gist for pasting code snippets…

    This is a bit above my head and more that we can really help with in the forums but I think what you’ll want to do here is modify the query string that’s passed in the URL. So in your form action you’ll want to dynamically pass in whatever was selected in the category drop down. Right now you’ve just got /events/upcoming and you’ll want to change that to events/category/your_selected_cat_name/upcoming/

    Another option would be hooking into pre_get_posts (http://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts) and adjusting the query based up on your search parameters there. I hope that helps and please do share whatever solution you come up with.

    FYI, we are looking to add functionality like this in a future version too 🙂

    #16814
    Jonah
    Participant

    I also found this in a google search that might help: http://melandri.net/2011/12/31/multiple-categories-filter-in-wordpress-search/

    #976344
    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 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Custom Search for events’ is closed to new replies.