Support » Themes and Templates » Overrule framework.css in Child theme

  • Is it possible to use a framework.css in a WordPress Child Theme to overrule the original framework.css? Just as the other items like style.css?

    I’ve made some changes but they only work when I adjust the original framework.css.

Viewing 3 replies - 1 through 3 (of 3 total)
  • It would depend on the theme, some themes load styles directly into the header.

    you can make the new styles !important;



    To override the framework.css in Blaskan with your own framework.css in your child theme add this code to the functions.php file in your child theme:

    function blaskan_css_init() {
      if ( !is_admin() && !in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-signup.php', 'wp-register.php' ) ) ) {
        wp_enqueue_style( 'blaskan-framework', get_stylesheet_directory_uri() . '/framework.css', array(), false, 'screen' );
        wp_enqueue_style( 'blaskan-style', get_bloginfo('stylesheet_url'), array(), false, 'screen' );

    Thnx David, Per!

    Didn’t tought about !important, but it works in some themes. The code from Per works perfect for my Blaskan-based theme, ;).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Overrule framework.css in Child theme’ is closed to new replies.