srikat / my-custom-functionality

A basic starter plugin to load assets like CSS and JS files in WordPress.
https://wpdevdesign.com/a-basic-wordpress-custom-functionality-plugin/
GNU General Public License v2.0
150 stars 41 forks source link

Add code to override CSS and Templates in a plugin #1

Open galtline opened 3 years ago

galtline commented 3 years ago

The files that I am trying to override are located in my plugin

plugins/forceten/resources/templates /admin /defaults /listings /pages /widgets

I have a plugin where I normally do overrides from a child generate press theme

We simply create a folder called forceten in the child theme and drop in our overrides as twig files.

If I want to create overrides while using oxygen what code do I drop in the php file of my custom functionality in order to override files from the above templates directory ?

srikat commented 3 years ago

The plugin needs to provide/have a filter hook that enables you to specify its template override folder to a location of your choice - in this case, the custom functionality plugin.

You need to contact the plugin developer about this. Details: https://wpdevdesign.com/overriding-plugin-templates-in-oxygen/.