is there any way to including bootstrap into our custom plugin without affecting theme ccs/js files?
I have include a php file with included bootstrap library at the head. when I activate my plugin something in my homepage changing
is there any way to including bootstrap into our custom plugin without affecting theme ccs/js files?
I have include a php file with included bootstrap library at the head. when I activate my plugin something in my homepage changing
2
Answers
Bootstrap has predefined styles for some tags like buttons, nav, … which is why it will override your theme style for these elements.
You could add an id to your body tag (for example: id="something") and then add #something in your theme’s css rules in front of the styles overridden by bootstrap so that your theme’s css will take precedence.
#nav {} would become #something #nav {}
See this as it’s similar: How can I override Bootstrap CSS styles?
go to functions.php in root directtory of your project and try to add this