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 force Dynamic CSS via ACF values to update on page load?
- wp_enqueue_script | Help me figure out what is causing jQuery is not defined
- Load JS file only in specific template
- functions.php – inject inline css from file
- How to insert class in each list of categories?
- enqueing Javascript and CSS
- Load custom CSS before admin CSS
- Including CSS files in HEAD based on page content
- This code works, but the way I integrated it is breaking the media uploader. How can I integrate it properly?
- Default Nav Highlight
- 404 when enqueue_script using plugin_url
- 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?
- How to pass variables from one function to another or combine functions
- Do we need to change our child function.php to require/include child dir files when we add an over-riding file.php into the child theme
- remove/hide wp-editor
- Getting out side of wp root folder from function.php using absolute path
- video.js not enqueueing?
- Include Jquery libraries in wordpress theme?
- Problem enqueuing scripts on not single posts
- Call two different function.js depending on page
- 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()`?
- Why I can’t load my JavaScripts using an hook inside my functions.php file?
- Enqueueing scripts selectively & activation where needed
- define css class in functions.php
- Why is this function crashing my wordpress installation? [closed]
- colorbox not loading in
- Fatal error: allowed memory size when after using enqueue_script
- wp_enqueue_script() not working
- Completely Disable WordPress RSS Feeds
- Load CSS before Theme CSS
- How to use wp_enqueue_script properly?
- Get webpack to work on child theme
- How to load a css file depending on the current role
- localize_script but data changes dependent on product ID
- Dequeue styles with query doesn’t work
- WordPress wp_dequeue_script remove all other scripts
- Combine page types and Custom Taxonomy in a functions.php command
- Problem with displaying CSS Stylesheets – Am I adding them correctly in my wordpress child theme?
- Can’t load assets
- Is it possible to load recaptcha script only in url with fragment identifier (#)?
- Can we have conditional CSS styling?
- Post content overflows on my mobile phone
- Bootstrap Integtration
- Remove clickable Link of WordPress Site Logo from Woocommerce Single Product page
- How to make the RTL.css the dominant css code?
- Why does my wp_enqueue_script() only insert the script for logged in users
- How do I make a custom “Read More Blogs” button for my blog page
- function class doesnt work
- Help using ShortCodes to style whole chunks of the post
- Setting Up Child Theme To Take Priority
- Unable to declare AOS library in functions
- how to remove a tag in the_category function
- 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
- How to add styles in existing function?
- Woocommerce – Switching Price for Category
- WP Enqueue Script Error