Should CSS code go with the plugin or in a child theme?

时间:2015-10-30 23:07:37

标签: javascript css wordpress plugins

I am making an extension to an existing plugin (so in essence I guess I'm writing plugin code). I want to modify the layout/UI of the existing plugin. Should I do this by writing code in my plugin's CSS/JS? Or do I need to make a child theme?

1 个答案:

答案 0 :(得分:1)

The purpose of a plugin is that it is theme independent. You should enqueue boilerplate css and js from the plugin itself. Obviously this is tricky because you have to support multiple grid systems etc. You could always allow for theme overrides like WooCommerce allows. From experience, this is the most effective approach.