Support

Home Forums Event Espresso Premium URL variable to display Espresso Event Category dynamically

URL variable to display Espresso Event Category dynamically

Posted: January 23, 2016 at 12:46 pm


Freddys

January 23, 2016 at 12:46 pm

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


Tony

  • Support Staff

January 25, 2016 at 3:52 am

Hi 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:

http://carrickinstitute.com/event-category/atlanta-ga/

Which will only display the events in that category, would that work?


Freddys

January 25, 2016 at 11:12 am

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?

Thank you for your help thus far. Very cool.


Lorenzo Orlando Caum

  • Support Staff

January 25, 2016 at 12:17 pm

Hi Freddys,

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:

https://eventespresso.com/wiki/events-table-view-template-add-on/#setup


Lorenzo

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.

Event Espresso