Update to work with child theme
-
Great plugin!
Hope you will consider updating this to work with child themes since that is recommended way to customize themes.I modified the plugin to do this, but will have to again with each plugin update. Also not sure this method will work with older versions of WordPress since wp_get_theme() was added in 4.3
In the plugin file wp-custom-post-template.php I modified the function wp_get_post_custom_templates() to use the active (in my case a child) theme directory when looking for templates instead of the base/parent:
Comment out line 90:
//$theme = get_option( 'template' );
And add:
$theme = wp_get_theme()->get( 'TextDomain' );
Appreciate the plugin, used it to make a custom template for this article to not have a sidebar.
https://www.ads-software.com/plugins/wp-custom-post-template/
- The topic ‘Update to work with child theme’ is closed to new replies.