Advertisement
grappler

load style

Jan 21st, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.60 KB | None | 0 0
  1. function responsive_parent_styles()
  2. {
  3.     $theme  = wp_get_theme( 'responsive' );
  4.  
  5.     // Register the parent stylesheet
  6.     wp_register_style( 'responsive-parent', get_template_directory_uri() . '/style.css', array(), $theme['Version'], 'all' );
  7.  
  8.     // Register the parent rtl stylesheet
  9.     if ( is_rtl() ) {
  10.     wp_register_style( 'responsive-parent-rtl', get_template_directory_uri() . '/rtl.css', array(), $theme['Version'], 'all' );
  11.     }
  12.  
  13.     // Enqueue the style
  14.     wp_enqueue_style( 'responsive-parent' );
  15.     wp_enqueue_style( 'responsive-parent-rtl' );
  16. }
  17. add_action( 'wp_enqueue_scripts', 'responsive_parent_styles' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement