Display search results for only upcoming events

Home Forums Calendar Products Events Calendar PRO Display search results for only upcoming events

Viewing 8 posts - 16 through 23 (of 23 total)
  • Author
    Posts
  • #13198
    Jonah
    Participant

    Sorry about that Kyle, I’m a little out of my league with this. Let me get someone else to help you. You should get a response by tomorrow.

    #13199
    Kyle
    Member

    No worries Jonah! Thank you for your ideas. I look forward to any additional help!

    #13200
    Joey Kudish
    Member

    Hi Kyle,

    A few small things that weren’t quite right with your code:
    – is_search() should be a method of $query not a variable (even though I believe the variable does exist)
    – your quotes were apostrophes instead of quotes use ‘ instead of ’ – I think this may just be because of the way you copy pasted it though
    – you can’t pass an array to $query->set(), you have to pass one query argument at a time

    The updated/cleaned-up code: https://gist.github.com/ed9e49dcbed0bb4988bc
    I haven’t tested it, but I think this should work. Let us know if you have any further issues with it.

    Cheers

    #13201
    Kyle
    Member

    Joachim, thank you for your response but this still does not work. I put in your code (removing the apostrophes and put in the single quotes), then test it and when you search it just redirects the page to the default events page not to the search page with search results.

    I have created a SANDBOX to test this in to ensure no other code interferes with this. Fresh WordPress install, using the 2011 theme and I still have this issue. You can see and test the site here – http://henriemediabackup.com/carefreelasvegas/

    #13204
    Joey Kudish
    Member

    Hi Kyle,

    Thanks for sending along the “sandbox” site.
    As far as I can tell, the function is actually working properly. For example, I searched for “test” and this is the result that I got: http://f.jkudi.sh/DFL7 (it found an event with the “test” name in it)

    The Events Calendar plugin, by default will always show either the grid or calendar view when displaying events, even for search results. In the upcoming 2.1 update (no release date yet) we will allow for better integration of events with other post types / loops and search results.

    In the mean time, you can overwrite the views/ecp-page-template.php, views/list.php and views/gridview.php (from the plugin folder) by adding a new folder named ‘events’ inside your theme and copying those 3 files in it. Then you can modify each one accordingly to how you want it to look / work using the is_search() conditional tag.

    Hope this helps.
    Joey

    #13205
    Kyle
    Member

    Thank you. I look forward to the 2.1 release for a little better overall integration.

    #13207
    Joey Kudish
    Member

    Glad we were able to help!

    Take care 🙂

    #975058
    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 8 posts - 16 through 23 (of 23 total)
  • The topic ‘Display search results for only upcoming events’ is closed to new replies.