Fatal Error: Class ‘Layers_Widget” not found in layers-pro-extension/widgets/post-carousel.php on line 14.

Troubleshooting  Last Updated: Time to Read: 1 minute

When viewing your site from a mobile device (not just in a responsive view) or attempting to preview your url using Social Commerce, you see this error or similar:

Fatal Error: ClassLayers_Widget’ not found in layers-pro-extension/widgets/post-carousel.php on line 14

The file name may vary depending on which widget comes first on your page.

​This happens when you have a plugin active that replaces Layers, such as a mobile plugin or Social Commerce. These replace your main theme, so when Layers pages are rendered that have widgets that require the Layers library, it can’t find what it needs and produces an error. In some cases the problem is made worse if you are running an outdated version of Layers Pro.

Error Appears on Mobile

  1. Go to Plugins in your admin and look for anything “mobile”and deactivate it. This includes Obox Mobile, WP-Touch and HandHeld.
  2. If you have Jetpack enabled, go to JetpackSettings and look for Mobile Theme and hover over it. If you have the option for Deactivate, click it.

Layers is fully responsive and will adapt to a mobile view automatically so these plugins are not necessary. To learn more about responsive views or customizing the mobile views of your site, see: How to Customize Responsive Views

General Solution

  1. Ensure Layers is up to date
  2. Verify all plugins active are up to date by going to DashboardUpdates
  3. Ensure all Layers extensions are up to date, specifically StoreKit and Layers Pro, if you have them. To update, download a fresh copy from your CodeCanyon or Layers dashboard and reinstall it.
  4.  If you have Social Commerce, ensure it is also updated by following these instructions