Closed 6 years ago.
I've developed One new wordpress plugin, using Latest Bootstrap (4) and latest FontAwesome (5) version. Is now looking good. All design is complete. Now When I install this plug-in with another website. Which website theme using old bootstrap (3) version and old fontawesome version. Then my design or existing theme design will be broken, It's version conflict 3 and 4. So How can I resolve this issue? How can I load this bootstrap 4 only for my plugin? Or how can I avoid 3 or 4 version conflict? Please suggest me.
Closed. This question is off-topic. It is not currently accepting answers.
Closed 6 years ago.
I've developed One new wordpress plugin, using Latest Bootstrap (4) and latest FontAwesome (5) version. Is now looking good. All design is complete. Now When I install this plug-in with another website. Which website theme using old bootstrap (3) version and old fontawesome version. Then my design or existing theme design will be broken, It's version conflict 3 and 4. So How can I resolve this issue? How can I load this bootstrap 4 only for my plugin? Or how can I avoid 3 or 4 version conflict? Please suggest me.
Although this is possible, you really don't want to load multiple versions of libraries as it's going to make your site slow to load.
You could try and use Bootstrap with a pre-processor like SASS with mixins to target just your plugin code and not the rest of the theme.
FontAwesome 4 and 5 seem to use different prefixes fa-
and fas-
so you could load FA5 before FA4 as per this post.
Lastly, you could
Bootstrap is a framework that is theme driven. For that reason, it would probably be a good idea to bundle your custom template logic with your plugin.
Lets say you desire to have this new BS4 template bundled in your plugin, and you want users to use it instead of their existing BS3 template. In regards to that relationship, here is one possible way to achieving this.