Posted: July 1, 2022 at 12:51 pm
|
We are using a custom template that we selected from the “Page template” option for a single event. We are trying to stop the ticket selector, date and time, and venue from getting injected into the_content. Our template already has these parts included in the template so we don’t want them injected with the description. We added the filter to the theme’s functions.php: Is there something we’re missing to prevent the injection into the_content? |
Hi there, To prevent the_content injection, this filter:
Should be:
Using |
|
|
Thanks for the clarification. Unfortunately the event’s details are still getting injected into the We changed the function to
I forgot to mention this course is “hidden” by excluding it from the archive page using this code snippet and is also password protected. Does it make a difference if the event is password protected? Is there something else we can try? |
|
I just checked the other events and the event’s details were getting injected after the event description in the custom single-espresso_events.php template we are using. I changed the function back to We are using a tweaked version of the custom single-espresso_events.php template for this hidden password protected event. |
Hi there! Thanks for getting back to us. I would like to check your custom template file and run a couple of tests from that. Could you please upload your file and share it with me as a private reply? |
|
|
This reply has been marked as private. |
The support post ‘How to stop the_content injection when using custom template?’ 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.