Support

Home Forums Event Espresso Premium ESPRESSO_EVENTS_TABLE_TEMPLATE – custom template not loading

ESPRESSO_EVENTS_TABLE_TEMPLATE – custom template not loading

Posted: September 6, 2023 at 1:25 pm


Laurel Briggs

September 6, 2023 at 1:25 pm

I have customized the espresso-events-table-template.template.php file and moved iot to my child theme. When I use the ESPRESSO_EVENTS_TABLE_TEMPLATE shortcode in my theme files it works great. But when I add the shortcode to the backend page editor, it does not use the customized template.

The exact shortcode I am using in both places is:
[ESPRESSO_EVENTS_TABLE_TEMPLATE category_slug=cpec-orientation category_filter=false show_expired=false show_all_datetimes=true footable=false]

I’ve tried inlcuding the template_file parameter to call the custom template directly, but that does not change anything. The shortcode uses the custom template file just fine without that parameter when I use it in a theme file.

I am using the latest version of EE: 5.0.10.p


Rio

  • Support Staff

September 7, 2023 at 3:19 am

If you take a look here: https://eventespresso.com/wiki/events-table-view-template-add-on/

There are instructions on how to load a custom template form your themes root directory, plz try those, customize the template and confirm if it loads using the shortcode on a page.

thanks.


Laurel Briggs

September 8, 2023 at 12:09 pm

Yes, those are the instructions I followed. Again, my custom template loads correctly when I add the shortcode to a theme file like a page template, but it does not work when I add the shotcode using the WordPress page editor. In that case, the event table works, but it does not load the custom template.


Tony

  • Support Staff

September 8, 2023 at 4:13 pm

Hi Laurel,

Just to clarify something above, when your using the shortcode within your theme your using do_shortcode(), correct?

so:

do_shortcode('[ESPRESSO_EVENTS_TABLE_TEMPLATE category_slug=cpec-orientation category_filter=false show_expired=false show_all_datetimes=true footable=false]');

but it does not work when I add the shotcode using the WordPress page editor.

This is odd!

Using the standard WP editor correct? (I assume so based on your reply but just checking) Can you add a screenshot?

Looking over your site it looks like your using visual composer?

Does it not load the template on the front end either?


Laurel Briggs

September 8, 2023 at 8:58 pm

Hi Tony,
Correct – I am using do_shortcode to insert the shortcode in a few of my custom theme page templates. These pages are login-restricted, but here is a screenshot where it is being used and is working correctly:
https://yesempower.com/wp-content/uploads/2023/09/Screenshot-2023-09-08-at-7.53.49-PM.png

Yes, the site uses visual composer/WP Bakery – I should have mentioned that. Here is a link to a page where the same shortcode is being used in a text editor block: https://yesempower.com/coach-training-academy/

The two tables look fairly similar, but the key change I made to the custom event template (seen in the screenshot) is the Register link opens the event details in a modal window.


Laurel Briggs

September 8, 2023 at 8:58 pm

Hi Tony,
Correct – I am using do_shortcode to insert the shortcode in a few of my custom theme page templates. These pages are login-restricted, but here is a screenshot where it is being used and is working correctly:
https://yesempower.com/wp-content/uploads/2023/09/Screenshot-2023-09-08-at-7.53.49-PM.png

Yes, the site uses visual composer/WP Bakery – I should have mentioned that. Here is a link to a page where the same shortcode is being used in a text editor block: https://yesempower.com/coach-training-academy/

The two tables look fairly similar, but the key change I made to the custom event template (seen in the screenshot) is the Register link opens the event details in a modal window.


Tony

  • Support Staff

September 11, 2023 at 5:15 pm

Hi Laurel,

So I’d like to take a deeper look at this and add some debug code within both the Table View Template and Event Espresso to try and get a better view of what is going on.

I can’t reproduce this locally even when using Visual Composer, so I’d like to output the details within the methods used to locate the template file and see where this is breaking down.

If that’s ok, I’ll need WP-Admin and FTP credentials which you can send over using this form:

https://eventespresso.com/send-login-details/

If you can create a new page with the shortcode on that I can view/work on this outside of your ‘normal’ pages that’d be great.


Laurel Briggs

September 14, 2023 at 2:13 pm

This reply has been marked as private.


Tony

  • Support Staff

September 18, 2023 at 5:16 am

Hi there,

Thank you for sending over the login credentials, I have responded directly via email.

I need to be able to add some debug code to the site and for that, I’ll need FTP access. If you can resubmit the form with those details included I can then check into this.


Laurel Briggs

September 20, 2023 at 5:39 am

Thanks for your help with this Tony! The issue was with some code in my custom event template that was restricting it to only work on certain pages. Tony was able to point out the problem and it is working well now so I’m marking this as resolved.

Thanks again!

The support post ‘ESPRESSO_EVENTS_TABLE_TEMPLATE – custom template not loading’ 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