Hi everybody,
I was wondering if it was possible to pass a URL variable to page that is using the shortcode to display a category listing, for example I am this one a page.
[ESPRESSO_EVENTS category_slug=”atlanta-ga”] and it shows the events that are in the category Atlanta, GA, which is exactly what I want.
But I had to create an actual page for each category I wanted to display. It would save me tons of time if I could pass along the slug in the URL and still be able to display the listing, so hopefully it would look something like: http://carrickinstitute.com/events/locations.php?category=atlanta-ga
How does one achieve this using the latest version of EE 4? I’m not much of a PHP wizard, so sorry if this is actually an easy question! 🙂
– Freddys
Currently Event Espresso does not pull in paramters for the shortcodes from the query parameters, to do this you would need the help of a developer to create a custom shortcode.
However you can use the event-category within the URL to display the events for that category, like this:
Oh wow, I didn’t even know that was possible to show event category with a URL like that. I think this will work nicely as we are making sure all events are tagged appropriately with categories.
Is there any way to display the Events Table instead of the event listing like that link you sent me?
Add-ons such as the events calendar, events grid template, and events table view template are another way to display your events to your registrants/attendees.
By default the events listing page here (example.com/events/) shows events in a list format view.
You could create a new WordPress page and add the following shortcode to it to show events in a events table view:
[ESPRESSO_EVENTS_TABLE_TEMPLATE]
Then you could include a link to that page in your website’s navigation menu through Appearance –> Menus.
It has several parameters available and you can see them here:
The support post ‘URL variable to display Espresso Event Category dynamically’ 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.