Home › Forums › Calendar Products › Events Calendar PRO › Support Question from Client
- This topic has 4 replies, 3 voices, and was last updated 9 years, 1 month ago by
Anders.
-
AuthorPosts
-
March 20, 2017 at 7:09 am #1256663
Anders
ParticipantHi there,
We were wondering if you could help with this question we received from a client of our today. They said:
“Basically, we’d like to stop the initial list of results from appearing (here: http://79.170.44.80/inn-dispensable.com/courses/) when the search form loads up for the first time. We obviously still want the results to appear when a location or date are entered in the form though.”
If you need more information please let us know.
They have already tried searching these forums for an answers but did not find one.
Many thanks,
boxChilliMarch 21, 2017 at 5:14 am #1257203Barry
MemberHi Anders,
Great question!
This is certainly custom dev territory so there’s a limit to how far we can help, but I’d be happy to outline a possible approach.
Focusing on list view for the moment, you could create a template override for list/content.php – which basically has the following structure (simplified):
<div id="tribe-events-content" class="tribe-events-list"> <!-- Code to display the list title, nav --> <!-- links and individual events, etc --> </div>In your case, you might add a conditional statement wrapping up everything inside that div, something like this:
<div id="tribe-events-content" class="tribe-events-list"> <?php if ( defined( 'DOING_AJAX' ) && DOING_AJAX ): ?> <!-- Code to display the list title, nav --> <!-- links and individual events, etc --> <?php endif; ?> </div>The idea being, it would only render the list of events if a query was first launched via ajax (which is what happens if you change the date or add a keyword search in the search bar).
This is a pretty simplistic solution, though – it doesn’t take care of scenarios such as a user searching for events and then sharing the URL with another user – but you could certainly expand on it and refine it to cover things like that.
I hope that helps!
March 21, 2017 at 9:24 am #1257317Anders
ParticipantHi there,
I hope it works! Many thanks for getting back to us you’ve been very helpful.
Kind Regards,
boxChilliMarch 21, 2017 at 1:47 pm #1257564Barry
MemberHappy to help 🙂
I’ll go ahead and close this topic, but should anything else crop up please don’t hesitate to create a new support topic and one of the team will be only too happy to assist further.
Cheers!
-
AuthorPosts
- The topic ‘Support Question from Client’ is closed to new replies.
