If your stylesheet is registered and enqueued correctly then…
function dequeue_my_css() {
wp_dequeue_style('my-css');
wp_deregister_style('my-css');
}
add_action('wp_enqueue_scripts','dequeue_my_css');
// add a priority if you need it
// add_action('wp_enqueue_scripts','dequeue_my_css',100);
… should remove it. That only works if the stylesheet was registered and/or enqueued with wp_register_style
and wp_enqueue_style
.
If it is not registered correctly then you will have to figure out what your theme did and undo that. It may require editing the template, depending on how the theme is written.
http://codex.wordpress.org/Function_Reference/wp_dequeue_style
http://codex.wordpress.org/Function_Reference/wp_deregister_style
Related Posts:
- CSS to make HTML page footer stay at bottom of the page with a minimum height, but not overlap the page
- How to get these two divs side-by-side?
- What is the difference between the selectors “.class.class” and “.class .class”?
- Is background-color:none valid CSS?
- Float a div above page content
- Text not wrapping inside a div element
- How to make padding:auto work in CSS?
- How to vertically center inside the parent element with CSS?
- How can I horizontally align my divs?
- background-size: cover not working?
- Pure CSS to make font-size responsive based on dynamic amount of characters
- CSS – display: none; not working
- Is there an opposite to display:none?
- Rainbow gradient on text in CSS
- font-weight is not working properly?
- What would be the best method to code heading/title for ul or ol, Like we have caption in table?
- How can I make my header image properly responsive?
- How to enqueue style before style.css
- wp_enqueue_scripts, wp_register_scripts, wp_print_scripts: i’m confused
- What is the correct way to enqueue multiple CSS files?
- Remove wp_add_inline_style
- Modernizr and WordPress – How can I add a CSS class to the html element?
- front-page.php stylesheet
- How to Add Admin Bar and Admin Menu or Submenu Notification Bubbles?
- WordPress Displaying Thumbnails Vertically
- Why do WordPress default themes specify fonts in so many places?
- How do I make Div Container 100% width only on homepage of site?
- CSS ?ver=4.6.1 not updating
- TwentyTwelve versioning
- Changing Font-Size based on specific Font thru javascript
- How to get child style.css to load last rather than second behind parent style.css?
- Relative file paths in CSS when linking directly (not enqueuing)
- Remove Genericons Helper CSS from twentyfourteen theme
- How do I style WordPress pages differently based on the tag used?
- How to make Custom Walker for wp_nav_menu() for materialize framework
- Use stylesheet from a different location
- Different ways to load child theme css
- Importing changes to Child Theme
- Can you edit WP gutenberg block css without a plugin?
- Style internal links based on the tags of the linked post
- How to override Bootstrap css with my child theme css in wordpress?
- How to stop Gutenberg from outputting inline CSS for specific blocks?
- Move the position of menu item [closed]
- “Scattered” gallery
- How to enable table overflow scroll? (especially order list table)
- Title has word broken when viewed in mobile [closed]
- Change background color of subpages
- How to fix this error? [closed]
- Faster fonts on mobile
- Reduce white space in twenty fourteen
- How to make WordPress using local CSS/Fonts/Scripts only
- How to know which order WordPress places CSS files?
- Placing background image over section divider
- How to remove the gap on right side of webpage (using Bootstrap with WordPress)?
- WordPress CSS problems with controls
- Remove CSS & JS from
- Show class from css in format dropdown
- All of my custom Bootstrap styles are not working in my child theme!
- Aligning line made with CSS [closed]
- Earlier stylesheet not overriding later one
- Overwriting forced wordpress CSS styles [closed]
- How to add/insert a class to a sidebar in single.php?
- Fixed height of the_content()
- Sidebar missing from Homepage
- W3TotalCache and Javascript — what should go where, when?
- CSS not being applied
- Help with a little CSS logo/header modification?
- WordPress sidebar content moving to bottom of page
- custom template display 3 columns
- underscores theme – sass folder structure vs smacss
- Does anyone know how to make text fade in when scrolling down, that doesn’t require any plug-ins? [duplicate]
- Inclution place of CSS file
- Blog page and the Home page showing the same content
- Img load while refreshing
- WP Admin Bar transparent on some pages (.screen-reader-shortcut)
- How to Compress Css/js code in wordpress and increase loading speed?
- Twenty Fourteen: Unsticky header after making header bigger
- How to Take Logo Out of Navigation Menu? [closed]
- @media applying globally and not separately for each screen width [closed]
- How remove the white space between my menu and slider?
- WordPress site using unknown overriding css
- Is there any way to turn off a particular scrolling behaviour?
- Sidebar at bottom however I have completely replaced theme folder back to original code
- Site not 100% responsive
- Dropdown menu’s fighting with each other [closed]
- Header formatting works for safari but not chrome @media screen size technique on iphone
- Scale An Image Thumbnail
- Style Switching
- Adding a css style to the main nav menu in child pages
- Adding custom css to a theme depending on whether the admin user is logged in or not
- Adjusting post width according to the image size
- single.php doesn’t getting style
- Converting Static HTML pages to WordPress
- Background tiles not working in iPad2 but ok everywhere else
- To override CSS of parent theme
- How to customize a theme’s navigation menu with css
- Can’t override CSS with child theme
- [class*=”content”]:before css styles in TwentyThirteen [closed]
- How to change the CSS in one file?
- Enqueue MCE Editor CSS in admin page