Two things you need to:
- Hook into
wp_enqueue_scripts
with a priority later than the parent theme’s. The default is10
so that’s a good assumption. If11
doesn’t work, check the parent theme’s source to see which priority it’s hooked at. - Use
wp_dequeue_style()
to do the dequeueing.
That will look like:
function wpse_293836_dequeue_parent_styles(){
wp_dequeue_style( 'theme-skin-color' );
}
add_action( 'wp_enqueue_scripts', 'wpse_293836_dequeue_parent_styles', 11 );
Note that you only need the handle of the script/style you want to dequeue. The path doesn’t matter. The handle should just be theme-skin-color
as WordPress adds -css
to the ID.
Related Posts:
- How to load scripts/styles specific for a page
- Theme JS is available but theme CSS isn’t
- Advanced method to control cache of enqueued style/script
- TinyMCE custom stylesheets for different post types
- Dequeue Scripts and Style for Mobile not working?
- Child Theme Not Overriding Parent Theme
- Enqueue script o style only if a template part is loaded
- Enqueue styles after a plugin
- If is multiple page templates
- Register and enqueue style.css custom theme
- Enqueue scripts not working with if is page conditional tag in functions.php
- Enqueue Style Only On Certain Pages Not Working
- Only let plugin add actions to wp_head & wp_footer on single posts
- enqueue styles for only mobile wp
- different style sheet for just one page template
- Scripts not loading when using the wp_enqueue_scripts action
- Split Media Queries in different files!
- Some questions about how proper add 2 CSS file in a WordPress theme?
- Why does get_template_directory_uri() not include “www”, only for enqueued stylesheets?
- Parent theme styles overriding child theme CSS [closed]
- I can’t add CSS with functions.php
- Proper Way to Load stylesheet on Condition
- get_template_directory_uri() links to child theme not parent
- Page Template Won’t Load Correct CSS File
- Add custom css file after plugin css with WordPress Child Theme functions.php
- wp enqueue style on about us page
- How to reference different css (bootstrap) stylesheets for the header and body of a page?
- Test CDN link from function.php or wp_enqueue_script/style?
- CSS style and app.js not loading
- Stylesheet does not load despite functions.php
- Child Theme not loading multiple stylesheets
- I need to ‘wp_dequeue_script’ and ‘styles’ and ADD a bunch of other css and js
- Why is style.css not loading through the functions.php
- custom post with loading script per single post
- using enqueue_script in a shortcode isn’t working
- Should I use `get_stylesheet_uri()` or `get_template_directory_uri()` when calling my CSS Stylesheet?
- wp_head not injecting css
- How can I get a list of all enqueued scripts and styles?
- WordPress Enqueue for homepage only, functions.php, wp-framework
- Enqueue Script with data attributes
- How can I dequeue a Plugin Stylesheet?
- Remove “says” from comments
- Enqueue less file not working in child theme?
- I created a child theme and it doesn’t work for some of the css files
- Enqueued Stylesheets Effecting Admin Styles
- wp_enqueue_script + how to load JS or CSS in one URL merge call?
- Enqueuing Script in functions.php vs on the page
- Relative path instead of absolute for wp_enqueue_script
- Load JS Script only for custom post types
- Child Theme files – what is needed?
- How do I add Bootstrap and LESS to my migrated WordPress site?
- Not sure if enqueuing js scripts properly
- How to Display Frontend CSS for Administrator only
- WordPress Menuing Question :focus
- how to en-queue jQuery to load before the tag
- responsive.css in the WordPress should be prioritized
- Change CSS for logged in users
- jQuery does not work
- How to stop wordpress from injecting hard-coded style into image attachments with captions
- header_image() with CSS
- add_action wp_enqueue_script priority level only works for admins
- In jquery use php variable to execute an enqueued jquery file
- Run a jquery script on on a certain template page
- How can I force Dynamic CSS via ACF values to update on page load?
- Load JS file only in specific template
- Custom styles in Tiny MCE with an external CSS file
- why can’t i add front.css to my frontpage.php
- How to load jQuery in TOP of wp_footer?
- I want to set global directory locations for my CSS and JS locations. How?
- Getting out side of wp root folder from function.php using absolute path
- video.js not enqueueing?
- Include Jquery libraries in wordpress theme?
- current_page_item is missing inside wp_nav_menu
- Enqueueing a code block from an options framework
- is there a way to get all queued scripts/styles into a template without `get_header()`?
- How to use wp_enqueue_script properly?
- Get webpack to work on child theme
- Dequeue styles with query doesn’t work
- Combine page types and Custom Taxonomy in a functions.php command
- Remove clickable Link of WordPress Site Logo from Woocommerce Single Product page
- How to make the RTL.css the dominant css code?
- How do I make a custom “Read More Blogs” button for my blog page
- Reference multiple style sheets, clearing styles for permalink page, custom fields for css
- CSS disabled after getting rid of emoji
- How do I create a child theme from PowerMag theme
- Woocommerce – Switching Price for Category
- WP Enqueue Script Error
- Help with is_page() and calling css for specific pages in a Child Theme
- Child theme style.css didn’t work properly but the Customize Additional CSS did [closed]
- True parameter but jquery register in header and not in the footer with wp_register_script
- Javascript and Stylesheet in child page
- Different body image backgrounds on different pages, posts and categories
- Preventing PHP Execution in Parent Theme
- Syling Custom Fields echo’s from from functions.php
- wp_enqueue_scripts called twice?
- Bootstrap 4 Optimization
- How can I append and prepend something to all post hyperlinks without using ::before or ::after? PHP hook solution?
- Why don’t ‘wp_nav_menu’ CSS classes work until a menu is created?
- plugin not loading my css and js
- Loading newest dependency javascript module file in functions.php