I created a plugin called "plugin-1"
Plugin Name :plugin-1
/*
*
*/
if ( wp_get_theme() == 'theme-1') {
//my plugin stuffs
}
And I have theme & child theme called "theme-1":
Theme Name : theme-1
Theme URI : theme-uri
And for eg "theme-1-child":
Theme Name : theme-1-child
The problem is I want to allow all my child themes to access the plugin "plugin-1"!!..
The case is my clients will create their own child but I need to allow to access the plugin!!
How can I do this? Kindly help me!!
Try this:
if ( wp_get_theme() == 'theme-1' || wp_get_theme() == 'theme-1-child') {
//my plugin stuffs
}