Posted: April 29, 2016 at 3:06 pm
|
I’m having an issue with the single-espresso_events.php file. I have copied the theme files from the Arabica directory and into my theme’s directory. I thought I was modifying the wrong file, so as a test, I modified the single-espresso_events.php file within the EE plugin directory and I was able to render the gibberish! So, it seems like the EE plugin’s theme is taking precedence somehow… but the template name correctly updates when I change it within my theme’s directory…. Essentially, all I’m trying to do is create a custom template that will hide the price of FREE tickets. I figured this would be a more elegant solution than directly finding the event-id, and all appropriate price selectors and setting their display properties to none. Any ideas? |
Hi there, The more elegant selection is you use a filter and return an empty string when the price is zero, like in this example:
You can add the above to a functions plugin or into your WordPress theme’s functions.php file. If you find that you want to make other changes to the single event template where template modification is the way forward, you can follow this guide from the documentation to set up a custom template: https://eventespresso.com/wiki/ee4-custom-post-types/#single_event_template |
|
|
Thanks Josh. This does the job. Is this still the solution for finding a list of EE4 hooks/filters: Reference: https://eventespresso.com/topic/developer-docs-with-action-and-filter-hooks/ |
Hi, It turns out there’s more specific information about EE4 hooks and filters in the developer documentation: |
|
The support post ‘Custom Template for Hiding Free Events’ 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.