Bootstrap version conflict 3 with 4 for wordpress theme and plugin

admin2025-06-03  2

Closed. This question is off-topic. It is not currently accepting answers.

Closed 6 years ago.

  • Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?
  • Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Improve this question

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.

  • Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?
  • Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Improve this question

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.

Share Improve this question asked Jan 29, 2019 at 15:41 Md Abul BasharMd Abul Bashar 271 gold badge1 silver badge9 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 0

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.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748960973a315179.html

最新回复(0)