Inline CSS Styles aus dem Astra Team entfernen
How to Remove Inline CSS from Astra?
How to Remove Inline CSS from Astra?
The following filter will remove inline CSS generated by the Astra theme and Astra Pro plugin. Paste the following code into child theme’s functions.php file
IMPORTANT NOTE: This filter will remove all the inline CSS added by Astra which will affect the styling of your website.
function astra_force_remove_style() {
add_filter( 'print_styles_array', function($styles) {
// Set styles to remove.
$styles_to_remove = array('astra-theme-css', 'astra-addon-css');
if(is_array($styles) AND count($styles) > 0){
foreach($styles AS $key => $code){
if(in_array($code, $styles_to_remove)){
unset($styles[$key]);
}
}
}
return $styles;
});
}
add_action('wp_enqueue_scripts', 'astra_force_remove_style', 99);
Was this article helpful? Yes NoDid not find a solution? We are here to help you succeed.Open a support ticket
Related Docs
- Gutenberg Editor And Frontend UI Improvements With Astra (3.7.4)
- Replace Deprecated Astra Theme and Astra Pro Hooks
- Hide the Text by Setting the Font Size to Zero
- How To Remove Underlined Content Links on Buttons and Specifics Classes?
- How To Disable the Block Editor Support for Widgets
- Remove Spacing Around Elementor Pro TOC Widget
- How To Apply New Default Button Padding Values?
- How To Hide Astra Settings for Specific User Roles?
- How to Fix Font-Weight Not Applying To Widget Titles?
- How to Self-Host Google Fonts in Astra?




















































































