Override a Plugin’s Templates with My Own Custom Plugin

I am looking to override the template files for an events plugin that I am using. The events plugin is The Events Calendar by Modern Tribe.

Now, Modern Tribe does allow for template overrides, but files need to be placed in your current theme and you need to create a directory called ‘/tribe-events/month/’ and my overrides would go in the month folder.

This is great and all, but this change needs to be done on several of my sites and I don’t want to have to revisit this issue whenever I update my theme.

Is there a way that I can create this directory on whatever my active theme is? Or is there a way that I can override these files directly with a custom plugin? Or is there a way that I can add another directory for the events system to look at for template overrides?

This question is a perfect example of what I want to do, but I want everything contained in my plugin so when I activate it, the changes are reflected.: https://theeventscalendar.com/support/forums/topic/override-templates-via-custom-plugin/

I would like to avoid using a child-theme at all costs.

Thank you for your help! If this is not possible, that is okay as well. What are some other options for me?

Read more here:: Override a Plugin’s Templates with My Own Custom Plugin

Leave a Reply

Your email address will not be published. Required fields are marked *