Support

Home Forums Event Espresso Premium archive-espresso_events.php not working with [ESPRESSO_EVENTS] shortcode

archive-espresso_events.php not working with [ESPRESSO_EVENTS] shortcode

Posted: February 25, 2019 at 12:41 pm

Viewing 3 reply threads


Antenna Digital

February 25, 2019 at 12:41 pm

I have updated the archive-espresso_events.php for the desired layout and it’s working as expected on the /events page.

But on another page “/upcoming-events” I using the [ESPRESSO_EVENTS] shortcode and the output is coming from the index.php file. I can’t seem to convince WP to use the new archive page.

Any suggestions?


Josh

  • Support Staff

February 25, 2019 at 12:51 pm

Hi,

The [ESPRESSO_EVENTS] shortcode does not actually use the archive-espresso_events.php template. Instead, it uses the content-espresso_events-shortcode.php template. You can copy that template from EE’s public/Espresso_Arabica_2014 folder, into your child theme, and any customizations you make to that template there will be used by the shortcode.


Antenna Digital

February 25, 2019 at 1:03 pm

Thanks Josh
That doesn’t seem to be working. Do I need to create a folder structure in our theme folder? or just place the content-espresso_events-shortcode.php in the root of my theme folder like I did for the archive version.
That’s what I did but when I make a small modification to that file it does not show up in the output (I added <h1>TEST</h1> just below the events_header call

<?php espresso_get_template_part( 'content', 'espresso_events-thumbnail' ); ?>
<?php espresso_get_template_part( 'content', 'espresso_events-header' ); ?>
<h1>TEST</h1>


Josh

  • Support Staff

February 25, 2019 at 1:35 pm

You do not need to create a folder. Did you put the modification within the block that’s wrapped within the if ( is_single() ) : check? If so, that’s why you’re not seeing your modification.

What you can do instead is put the code modification anywhere outside the is_single() block.

Viewing 3 reply threads

The support post ‘archive-espresso_events.php not working with [ESPRESSO_EVENTS] shortcode’ 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