Home › Forums › Calendar Products › Events Calendar PRO › Display search results for only upcoming events
- This topic has 22 replies, 5 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
January 11, 2012 at 10:46 am #13198
Jonah
ParticipantSorry 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.
January 11, 2012 at 10:48 am #13199Kyle
MemberNo worries Jonah! Thank you for your ideas. I look forward to any additional help!
January 11, 2012 at 11:22 am #13200Joey Kudish
MemberHi 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 timeThe 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
January 11, 2012 at 11:29 am #13201Kyle
MemberJoachim, 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/
January 11, 2012 at 11:53 am #13204Joey Kudish
MemberHi 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.
JoeyJanuary 11, 2012 at 12:01 pm #13205Kyle
MemberThank you. I look forward to the 2.1 release for a little better overall integration.
January 11, 2012 at 12:09 pm #13207Joey Kudish
MemberGlad we were able to help!
Take care 🙂
July 2, 2015 at 5:00 pm #975058Support Droid
KeymasterThis 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. -
AuthorPosts
- The topic ‘Display search results for only upcoming events’ is closed to new replies.
