SHARE
TWEET

cod12

a guest Aug 25th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if ( !function_exists( 'chld_thm_cfg_parent_css' ) ):
  2.     function chld_thm_cfg_parent_css() {
  3.         wp_enqueue_style( 'chld_thm_cfg_parent', trailingslashit( get_template_directory_uri() ) . 'style-addon.css', array(  ) );
  4.     }
  5. endif;
  6. add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css', 10 );
  7.  
  8. if ( !function_exists( 'child_theme_configurator_css' ) ):
  9.     function child_theme_configurator_css() {
  10.         wp_enqueue_style( 'chld_thm_cfg_separate', trailingslashit( get_stylesheet_directory_uri() ) . 'style-mobile.css', array( 'easywp-maincss','chld_thm_cfg_parent','font-awesome' ) );
  11.     }
  12. endif;
  13. add_action( 'wp_enqueue_scripts', 'child_theme_configurator_css', 20 );
  14.  
  15. ////////// или //////////////////
  16.  
  17. add_action( 'wp_enqueue_scripts', 'jurvrn_on_easywp_enqueue_child_styles', 30 );
  18. function jurvrn_on_easywp_enqueue_child_styles()
  19. {
  20.     $parent_style = 'parent-style';
  21.     wp_enqueue_style($parent_style, get_template_directory_uri() . '/style.css' );
  22.     wp_enqueue_style('child-style-addon', get_stylesheet_directory_uri() . '/style-addon.css', array( $parent_style ), wp_get_theme()->get('Version') );
  23.     wp_enqueue_style('child-style-mobile', get_stylesheet_directory_uri() . '/style-mobile.css', array( 'child-style-addon', $parent_style ), wp_get_theme()->get('Version') );
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top