I am creating a child theme. I noticed my parent theme is adding some inline CSS in its functions.php:
wp_add_inline_style( 'persona-style-css', $custom_css );
Since I cannot change some values there, is it possible to dequeue it? I have tried to dequeue it using wp_dequeue_style ('persona-style-css')
but it didn’t really help.
Thanks in advance.
If wp_add_inline_css
is fired within an action you can use remove_action
with the same parameters.
You also might use wp_enqueue_scripts
action to dequeue any scripts or styles in a proper way. But, inline style are not included in the $wp_styles
global, you can unset them with the action print_styles_array
, you need to know the handle name to unset it.
Hope it gives you some hints to make it works.