How to ignore the specific CSS codes coming from the WordPress plugin stylesheet?

后端 未结 8 1537
闹比i
闹比i 2021-01-12 18:13

I am working on a WordPress website built on custom theme in which I want to ignore some specific CSS codes coming from wordpress plugin style sheet.

8条回答
  •  春和景丽
    2021-01-12 18:57

    I'd say you should check the handle of the plugin's stylesheet. Look into the wp_enqueue_style part and find out that handle, and then add your own styleshet AFTER that handle by using that handle as a dependency. For example, put this in your theme's function.php:

    wp_enqueue_style( 'your_own_handle', 'path/to/your/overwrite_stylesheet.css', array('handle_of_plugin1','handle_of_plugin2'))
    

    With that done, you could overwrite all the plugin css either in whole or in parts.

提交回复
热议问题