WordPress Divi Theme Continue Targeting Switch Error?

As you already know, I deal with a lot of websites and some affiliate sites for myself or clients. One of the latest issues I discovered yesterday was an incompatibility error with Divi and WordPress 5.2.1. I Bought loads of themes for the affiliates and started testing and designing them until I got 3 sites with the same errors. This Post is not really for SEOs but is a good thing to know and understand from a PHP developer’s perspective.

I began installing Divi because it is easy to manage and customize. Mind you I’m running WordPress 5.2.1. After installing the theme I immediately encountered an error message that breaks the header section of the website and even the login page.

Wordpress 5.2.1 Installation

Here’s the Error Message: Warning: “continue” targeting switch is equivalent to “break”; Did you mean to use “continue 2”? in www/url path

Divi and WordPress 5.2.1 Warning.

The Clue to fixing this is already in the Warning provided by WP X Divi.

So Like any educated or cultured gamer, I would advise you to backup your website before doing anything else.

Luckily I installed Backup Guard to help me save in between points of editing the websites I manage.

Simple Steps to Backup Your WordPress Site with Backup Guard.

Login to WordPress, Select Plugins and Click Add New, Type backup guard, select the plugin, install and activate.

Installing backup guard on wordpress

Now Create Your Backup using the Backup Guard Plugin. Wait til it finishes and go back to Dashboard.

Creating a backup or restore point with Backup Guard on WordPress 5.2.1

Let’s continue, follow the path using Cpanel, FileZilla or in My case I use WP File Manager. Follow the exact path:

WP File Manager on WordPress

WP File Manager >> wp-content>>themes>>Divi>>includes>>builder>>functions.php

Right Click and Select Code Editor on functions.php

Got to the Line specified by the warning: Line 5840

Fixing Divi theme error on WordPress 5.2.1


Add 2 in the code above since the error said Did you mean “continue 2”.

Save and close the file.

Refresh Your Browser.

Clear Cache in some cases.

All Done.

Try to replicate the issue once more on a different instance and check for the error.

sitemap error because of divi theme
Issue with xml sitemap
website sitemap check
No more issues

Yup we are done here. In the wise words of Apu: “Thank you come again!”.

Posted in: SEO

Leave a Reply

Your email address will not be published. Required fields are marked *