Support

Home Forums Event Espresso Premium Copying template files to a child theme isn't overriding anything

Copying template files to a child theme isn't overriding anything

Posted: January 9, 2019 at 10:10 am

Viewing 7 reply threads


mireaux2019

January 9, 2019 at 10:10 am

I found instructions here https://eventespresso.com/wiki/ee4-shortcodes-template-variables/ to copy files under /event-espresso-core-reg/public/Espresso_Arabica_2014/ to your child theme in order to modify them. I have tried that with content-espresso_events-shortcode.php and it isn’t overriding anything. How can I modify what that file is outputting without modifying the main plugin file? Or is that my only option? Thanks.


Josh

  • Support Staff

January 9, 2019 at 10:28 am

Hi,

The instructions on the /ee4-shortcodes-template-variables/ wiki about copying the espresso_event_attendees.php file from Espresso_Arabica_2014 is specific to the Attendee list template. The instruction there does not actually apply to the other templates.

May I ask what exactly are you trying to change with the output of the Espresso Events shortcode? If I know what you’re looking to change I can point you in the right direction.


mireaux2019

January 9, 2019 at 10:35 am

I have a list of events using [ESPRESSO_EVENTS] shortcode, but it is missing a bit of data and I need to modify how some of the data is displaying. I need to do 3 things:

1. add “City, State” to the displayed data

2. modify how the dates are displaying – “Jan 10” instead of “January 10, 2019”

3. Switch out the Read More button for an icon.

I know I can use js/css for #2 and #3 if necessary but I can’t do that for #1


mireaux2019

January 9, 2019 at 10:39 am

Sorry, I meant switch out the View Details button, it doesnt say Read More


Josh

  • Support Staff

January 9, 2019 at 11:08 am

wrt 1, where exactly do you want to display the City and State? A screenshot may be helpful in this case.

wrt 2, you can override the datetime template (copy content-espresso_events-datetimes.php to your child theme). Then change:
espresso_list_of_event_dates( $post->ID );
to
espresso_list_of_event_dates( $post->ID, 'M j' );

wrt 3, CSS might be the best option there because you can retain the text for screen readers by doing:

.view-details-btn {
text-indent: -5000px;
background: none !important;
}


mireaux2019

January 9, 2019 at 11:20 am

Here is a link to a screenshot of what i’m trying to accomplish: https://mireauxms.com/screenshot.png But I actually managed to use CSS to show the city and state by displaying event venue details, and then hiding everything except the span tags surrounding city and state.

Is there a list anywhere of which /Espresso_Arabica_2014/ files are able to be overwritten with a child theme and which aren’t?


Josh

  • Support Staff

January 9, 2019 at 11:29 am

No list, but basically any of the templates that display specific data can be copied over. So for example, instead of using CSS to hide almost everything that content-espresso_events-venues.php outputs, you could copy that file over to the child theme and change the conditionals & markup within.


mireaux2019

January 9, 2019 at 12:04 pm

Okay, thank you very much for helping me.

Viewing 7 reply threads

The support post ‘Copying template files to a child theme isn't overriding anything’ 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