public
Created

Enqueue child and parent style from the WordPress.org theme 'Responsive'

  • Download Gist
gistfile1.php
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<?php
 
class Responsive_Childtheme_Enqueue {
public function __construct() {
add_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ) );
}
 
public function wp_enqueue_scripts() {
wp_deregister_style( 'responsive-style' );
wp_register_style( 'responsive-style', get_template_directory_uri() . '/style.css', false, get_responsive_template_version() );
wp_enqueue_style( 'responsive-style' );
 
wp_register_style( 'responsive-child', get_stylesheet_uri(), false, get_responsive_theme_version() );
wp_enqueue_style( 'responsive-child' );
}
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.