Hi Simon,
Thanks for the update and glad that FAQ element styles are now fixed.
> Pricing tables not yet. I created a simple test page to demo the problem.
> Could you please advise me if this is Bootstrap related or not?
> hidden link
- I noticed that the pricing table on that page seems to be showing correctly, similar to the one at the demo page:
hidden link
( screenshot: hidden link )
I don't see any impact of the Bootstrap styles loaded through Toolset (through that new code snippet) on this table.
1) Is it acceptable to place the code into Toolset > Custom Code instead of adding it at beginning of functions.php? We tried using the Custom Code section for another thing, but it didn't work there and when we upgrade the Avada theme, sometimes these code snippets go missing, so it would be great if the Toolset Custom Code feature was acceptable for this.
- Yes, the PHP code snippet from the other thread can be included through the Toolset's custom code feature, too.
https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/
( screenshot: hidden link )
As explained in the relevant guide, for some PHP snippets, you'll have to adjust the execution timing through the priority number:
https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/#snippet-execution-timing
Also, a general recommendation is to always add theme customizations through a child theme, so they are not lost when the main/parent theme is updated:
hidden link
2) For my understanding, as I'm not a PHP developer: What we have just done is allow Avada to load Bootstrap first, and then if Toolset needs to override it, for example to display Forms correctly, then it uses its own Bootstrap code and overrides that of the Avada theme, correct?
- Your understanding is mostly correct, but let me explain what we're doing through here.
a). Bootstrap library resources consist of CSS styles and JavaScript code.
( ref: hidden link )
b). When the Bootstrap library is loaded through Toolset plugins, both CSS styles and JavaScript code is loaded.
c). But the Avada theme loads its own modified Boostrap resources, which result in a conflict when they're also loaded through Toolset.
d). When we set "The theme or another plugin is already loading Bootstrap 4" in the Toolset settings, we stop Toolset plugins from loading any Bootstrap resources.
e). But through the PHP snippet, we only selectively load the CSS styles part from Toolset's Bootstrap resources, which help in fixing the missing styles but without bringing in the script conflicts.
I hope this clarifies.
regards,
Waqar