child theme and enqueue-ing new scripts and styles
-
I am having issues with removing the base Simone scripts and styles and re-enqueueing the ones from the child theme. I need to change the font stack and many of the media queries and would rather not do that directly in Simone. My child theme is “ip” and the functions.php code is below.
If anyone has some insight as to what I did wrong, or could post an example of how it should be done, I would appreciate it. Thanks.
<?php add_action( 'wp_enqueue_scripts', 'dequeue_parent_theme_styles', 11 ); function dequeue_parent_theme_styles() { wp_dequeue_style( 'simone-parent-style' ); wp_dequeue_style( 'simone-layout' ); wp_dequeue_style( 'simone-google-fonts', ); wp_dequeue_script( 'simone-superfish-settings', ); wp_dequeue_script( 'simone-masonry', ); } /** * Enqueue scripts and styles. */ function ip_scripts() { wp_enqueue_style( 'ip-style', get_stylesheet_uri() ); wp_enqueue_style( 'ip-style-custom', get_template_directory_uri() . '/style-custom.css', array( 'ip-style' ) ); wp_enqueue_style( 'ip-layout' , get_template_directory_uri() . '/layouts/content-sidebar.css' ); wp_enqueue_script( 'ip-superfish-settings', get_template_directory_uri() . '/js/superfish-settings.js', array('jquery'), '20140328', true ); wp_enqueue_script( 'ip-masonry', get_template_directory_uri() . '/js/masonry-settings.js', array('masonry'), '20140401', true ); // Open Sans + Open Sans Condensed wp_enqueue_style( 'ip-google-fonts', '//fonts.googleapis.com/css?family=Open+Sans:400,400italic,700,700italic|Open+Sans+Condensed:700' ); add_action( 'wp_enqueue_scripts', 'ip_scripts' );
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘child theme and enqueue-ing new scripts and styles’ is closed to new replies.