• I’m checking my new theme using the theme-check plugin. However the settings page for the plugin is using the styling from my theme. I am checking for is_admin to decide whether to add my theme’s stylesheet.

    This is the plugin’s page that has my theme’s style applied:
    wp-admin/themes.php?page=themecheck

    In my theme’s function.php file I register my theme’s style sheet with:

    wp_register_style( 'style' , get_stylesheet_directory_uri() . '/style.css', array( ), '1.0' );
    if ( ! is_admin() ) {
    	wp_enqueue_style( 'style' );
    }

    The question is why does the theme-check plugin page not respect is_admin() or is there a problem with how I am including my theme’s style sheet. I realize I could add the stylesheet definition from header.php but that seems wrong.

    https://www.ads-software.com/extend/plugins/theme-check/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Theme-Check] is_admin() ?’ is closed to new replies.