Skip to content

Instantly share code, notes, and snippets.

@grappler
Last active December 17, 2015 00:29
Show Gist options
  • Select an option

  • Save grappler/5521193 to your computer and use it in GitHub Desktop.

Select an option

Save grappler/5521193 to your computer and use it in GitHub Desktop.
<?php
/**
* Load the style sheet from the parent theme.
*
*/
function theme_name_parent_styles() {
// Enqueue the parent stylesheet
wp_enqueue_style( 'theme-name-parent-style', get_template_directory_uri() . '/style.css', array(), '0.1', 'all' );
// Enqueue the parent rtl stylesheet
if ( is_rtl() ) {
wp_enqueue_style( 'theme-name-parent-style-rtl', get_template_directory_uri() . '/rtl.css', array(), '0.1', 'all' );
}
}
add_action( 'wp_enqueue_scripts', 'theme_name_parent_styles' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment