Overwrite responsive.css in a child theme or child theme in wordpress?

0

I'm trying to overwrite a custom css file called responsive.css with children themes in wordpress.

If I edit the responsive.css of the father there is no problem but if I do it in the responsive.css son does not work

The rest of the files (style.css) if it works on the child theme but responsive.css does not work.

    
asked by Lorthas 16.11.2016 в 15:07
source

1 answer

1

What you should do is add the replacement of this file in the functions.php of your child theme:

function nombredemitemapadre_child_enqueue_scripts() {
    wp_dequeue_style( 'nombredemitemapadre-responsive' );
    wp_enqueue_style( 'nombredemitemapadre-child-responsive', get_stylesheet_directory_uri() . '/responsive.css' );
}
add_action( 'wp_enqueue_scripts', 'nombredemitemapadre_child_enqueue_scripts', 11 );

If you notice, in the action of wp_enqueue_scripts first deregister the responsive.css and then register the new

    
answered by 16.11.2016 / 15:45
source