Can I have 2 shortcodes on the same page? I want 2 sections on the page. Each section shows a specific category. Like the following…
Summer Camps Ages 9-18
[ESPRESSO_EVENTS category_slug=”day-camp” css_class=”event-boxes”]
Summer Camps Ages 5-8
[ESPRESSO_EVENTS category_slug=”youth-day-camp” css_class=”event-boxes”]
The first group shows up fine, but the second group is showing the events that belong in the first group and they get all out of order. They’re not ASC properly.
Are there any known issues with using your shortcodes in a page builder? I turned off caching and the problem is still there. When I look at it in inspector it shows as if both sections are using the same category slug, but they’re not. I just need to show 2 sections – each section using a shortcode that contains different category_slugs. The only thing I can think is the problem would be the use of a text block element in a page builder.
The issue you’re describing could occur if the theme ends up overriding the second query. Normally when you place two shortcodes on the same page it will run the second event query and return the expected results.
Can you try activating the theme test drive plugin and check the page using a default theme?
Viewing 3 reply threads
The support post ‘espresso_events shortcode with multiple variables (2)’ 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.