• Is there a way to tell WordPress to ignore the theme’s stylesheet (style.css) when loading a particular page (or template) in the Twenty-Twelve theme?

    Not “add” a custom stylesheet, but rather tell wordpress not to use the theme’s stylesheet and let the page run on the css linked from the custom header file.

    Thank you in advance to anyone who can help!

Viewing 1 replies (of 1 total)
  • Thread Starter twowithink

    (@twowithink)

    Solved! Here is the solution:

    https://wordpress.org/support/topic/different-css-sheet-for-homepage-template

    In the child-theme functions.php file I put:

    //remove general stylesheets for front page and add special stylesheet//

    add_action( ‘wp_enqueue_scripts’, ‘twentytwelvechild_scripts_styles’, 20 );

    function twentytwelvechild_scripts_styles() {

    if( is_page_template( ‘partners.php’ ) ) {
    //dequeue existing stylesheets//
    wp_dequeue_style( ‘twentytwelve-style’ );
    wp_dequeue_style( ‘twentytwelve-ie’ );
    //enqueue new stylesheet(s)
    wp_enqueue_style( ‘twentytwelvechild-partners’, get_stylesheet_directory_uri().’/partners-style.css’ );
    }
    }

Viewing 1 replies (of 1 total)
  • The topic ‘Possible to ignore the theme's stylesheet on custom page?’ is closed to new replies.