We have multiple events being promoted by direct mail. I’d like to include the event ID on the mailing, and have the registrant go to a landing page, enter that code, and have them taken to the corresponding event page.
The easiest way to achieve that would be to have a search box on the landing page, but I can’t find any shortcode in ee4 to generate a search box? Any help is appreciated!
That’s an interesting idea. One potential issue with a search form is it will not automatically take the registrant to an event page. This is because a search form will that the user to a search results page.
In any case, Event Espresso (or WordPress itself) doesn’t actually provide a search shortcode, but one can be added with one line of code by following this guide:
After you have a search page set up, you’ll need to add a way for WordPress to search by post ID, because WordPress doesn’t automatically search by post ID. One way to add search by post ID is you install this plugin: https://wordpress.org/plugins/relevanssi/
then you add a bit of PHP code to allow searching by post ID, outlined here: https://www.relevanssi.com/knowledge-base/searching-post-id/
This will add post IDs to the search Index.
You’ll also need to set Relevanssi’s index to include espresso_events (set in Settings > Relevanssi > Indexing.
Then after you build the index in Relevanssi’s settings page, you’ll have a functional search form that returns results based on post ID
Viewing 1 reply thread
The support post ‘EE4 – Search Capability’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.