Is there any way I can make the search results shown in a separate page?
I want to have the date rage search on my home page but I need the results to be shown in a regular page.
Please let me know how I can achieve this.
Thanks

Mehrdad Emami
Hi Mehrdad,
Unfortunately the shortcode is designed to display results on that same page. While it would be possible to create a search form in which events are displayed on a separate page, that is not what the shortcode does.
To display a search form which points to a separate page, you could try the following (this is untested, and very basic):
<form action="http://dev/wp/" method="post">
<label for="event-search"> Search </label>
<input type="text" id="event-search" name="s" value="">
<label for="event-start-after"> Event start after </label>
<input type="date" id="event-start-after" name="event_start_after" value="">
<label for="event-start-before"> Event start before </label>
<input type="date" id="event-start-before" name="event_start_before" value="">
<input type="hidden" name="post_type" value="event">
<input type="submit" value="Search">
</form>
As mentioned this is just a basic example intended only as a proof of concept. It relies on the browser’s proper treatment of ‘date’ fields as opposed to using a JavaScript alternative. Please note you need to provide your site’s address in the form action
.
Note that the template used to display event search results using the event search shortcode is editable, in case that would act as a suitable alternative to using a separate page?
The template, search-event-list.php
can be found in event-organiser-pro/templates/

Stephen Harris
I added the code but it doesn’t have the date picker. Just three simple fields and a search button.
I desperately need this search functionality.
Could you please provide me with a code that works?
It’s ok if it’s not the shortcode. Just a separate search functionality.

Mehrdad Emami
Hi Mehrdad,
For cross-browser support with type=date
you can use something like: https://github.com/chemerisuk/better-dateinput-polyfill
But the above snippet was only intended as a proof of concept as a potential alternative. I’d recommend you use the the event search shortcode. It displays events matching a search, and uses jQuery datepicker for date fields. Furthermore the template allows you to alter the appearance of those returned events as desired.

Stephen Harris
Yes, I prefer using the shortcode.
But I just need to show the results on a separate page because the search box is going to be on the home page.
There must be a way to change the code to achieve this. I’m not a php programer but I understand the code to some extent.
I have searched and tested all the WordPress calendars out there and none are as complete as Event Organizer.
So my only chance is to get this to work.
Please let me know what can be done.
Thanks so much

Mehrdad Emami
So as an alternative to a separate page, Can we make the search results just appear on the page without jumping to the top of the page?
Because currently I have the search button somewhere down the home page and when I click the search button, the page jumps to the top and I have to scroll down to find the results.
Thank You

Mehrdad Emami