[Resolved] Messed up DIVI styling when creating new post
This thread is resolved. Here is a description of the problem and solution.
Problem:
A View uses a Content Template styled with Divi for its output. There is custom CSS added to the Divi modules, but the styling breaks on the front end when new posts are added.
Could I get some more details from you about the issue.
Can you show the styling problem on a screenshot?
Can you clarify how the affected area is generated?
We are working on updating the documentation for using Toolset with Divi.
We have an intractable problem that Toolset is in-part based upon Bootstrap, and Divi is incompatible with Bootstrap.
We are updating our advice to state that, if you are using Divi:
- you should not use Layouts
- you should disable Bootstrap (at Toolset > Settings)
There may be specific cases where there are still styling issues, and for the most common cases we will suggest CSS workarounds (and if there are enough of these we may bundle them into a special stylesheet that we load when we detect Divi in use).
If I can get more details of your issue I may add it to the list of cases we need to provide a workaround for.
Hi Nigel
This is disappointing. I launched myself with Toolset and DIVI because you site claims "... DIVI is your friend..."
• I don't use library layouts in DIVI (although I would like to).
• I have switched off Bootstrap in Toolset
See the two screen shots:
•The first is OK because the template was generated AFTER the posts
• The second shows styling issues on the last post after creating the "New item". Steak Tartare is styled as a description and its details styled as the item and I also lost the line spacing generated by DIVI.
I really need a fix for this as I've spent a lot of time getting to this stage.
Thanks.
Robert
I can see how custom styles are being added to the text module sections and in the problem screenshot these styles have somehow gone out-of-sync with the content, so that font-size 11 is being applied to the title and size 14 the description in the final row.
I don't want to break anything, so I'm going to take a copy of your site so that I can do some more testing locally to see if I can identify the source of the problem.
I'll get back to you with my findings and we can hopefully fix this and you can proceed.
The issue appears to be a problem with Divi caching.
My colleague added the following code to the copy of your site to fix the issue (you can add it to your theme's functions.php file, or using a plugin such as Code Snippets):
Thanks Nigel
I've tried that but but I get a "Parse error: syntax error, unexpected '&' in /home/rphnet/public_html/wp-content/themes/dev1/functions.php on line 27" with the snippet. Can you guide me through that, do I need to personalise the code?. I've changed things (customs posts are now "participants" but they were "plats") but the styling problem persist at hidden link – see last entries. If I resave the View then its OK but I can't expect my client to resave the view every time he adds content.
Thanks.
Thanks Niger
I made that one change of post slug but the problem persists. When I create a new post the styling of that of that post is applied but is removed from previous posts at the bottom of the list. See "new" posts which are OK but each time a post is added a previous post loses its styling. At the moment 3 new post added and three that lose there styling.
I wanted to check something on your site but the FTP credentials you supplied don't work.
I need to double-check the name of the directory where Divi caches its custom CSS on your site.
Let me set a private reply for you if you could please update the FTP credentials. (You can ignore the template where it asks for WordPress site credentials.)