Skip to content

Instantly share code, notes, and snippets.

@markoheijnen
Created January 1, 2013 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markoheijnen/4424020 to your computer and use it in GitHub Desktop.
Save markoheijnen/4424020 to your computer and use it in GitHub Desktop.
Enqueue child and parent style from the WordPress.org theme 'Responsive'
<?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' );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment