Home Forums Event Espresso Premium Shortcode doesn't work properly in theme template file

Shortcode doesn't work properly in theme template file

Posted: June 25, 2019 at 5:23 am


June 25, 2019 at 5:23 am

I have a website under development and I am trying to get a theme file to show a table listing of a certain category (I have table add-on) with pagination at the bottom of a custom post type page. In the theme file I am using the shortcode “echo do_shortcode(“[ESPRESSO_EVENTS_TABLE_TEMPLATE table_search=false category_filter=false show_expired=true table_style=metro order_by=start_date sort=DESC table_pages=20 category_slug=management-development]”);”
The list of events shows but there is no pagination or option to order by column. But if I put the same shortcode into the post content, it works and does has pagination and the option to order by column.
Does the shortcode not work properly outside of the content?
See this link for example –


  • Support Staff

June 25, 2019 at 7:58 am


There’s an effort to not load scripts everywhere unnecessarily, so normally the needed script is only loaded if the shortcode is found within the content. You can manually enqueue the needed script by adding the following PHP code to your custom template:

    EE_EVENTS_TABLE_TEMPLATE_URL . 'scripts' . DS . 'espresso_events_table_template.js',

You can add the above anywhere before the get_footer(); call.


June 27, 2019 at 4:23 am

Hi Josh,
Thanks, that worked.

The support post ‘Shortcode doesn't work properly in theme template file’ 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.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  create_kb 9 months, 2 weeks ago ago

Topic Tags



This topic is: resolved
Do NOT follow this link or you will be banned from the site!