I added this code to my functions file so there are different theme options depending on whether or not a plugin is activated.
function theme_options_select() {
if( is_plugin_active( 'gallery-nails/gallery-nails.php' )) {
require get_template_directory() . '/inc/theme-options/nails/theme-options.php';
}
else {
require get_template_directory() . '/inc/theme-options/default/theme-options.php';
}
}
add_action( 'wp_loaded', 'theme_options_select' );
I've tried plugin_loaded and setup_theme but then the theme options are inaccessible. init works as well but also breaks the login.
Anyone know how to fix this?