If your Divi featured image appears twice on your WordPress posts, the most common reason is a conflict between the theme’s settings and how WordPress handles featured images. The solution? Turn off the automatic insertion of featured images in Divi’s theme settings or tweak your template files. Let’s dive deeper into this issue and explore step-by-step fixes.
Why Does the Divi Featured Image Appear Twice?
This issue arises due to a redundancy in how Divi handles featured images:
- Divi’s Theme Settings Automatically Insert the Featured Image: By default, Divi often displays the featured image at the top of the post.
- Custom Template Code Conflicts: If your single.php or content-single.php files are coded to display the featured image, duplication can occur.
- Plugin Conflicts: Certain plugins (e.g., SEO tools, gallery add-ons) may reinsert the featured image.
- Divi Builder: Manually adding an image block in the Divi Builder can duplicate the displayed image.
Step-by-Step Fixes for the Divi Featured Image Duplication
Adjust Divi’s Theme Options
The most straightforward fix is to turn off the automatic insertion of featured images in Divi.
- Go to Divi > Theme Options > General Settings.
- Locate the “Place Thumbs on Posts” option and toggle it off.
- Save changes and refresh your post to confirm the fix.
Modify Your Post Template Files
If the issue persists, your post template files might be adding the featured image. Here’s how to fix it:
- Access your site via an FTP client or the WordPress theme editor.
- Open the single.php or content-single.php file in your Divi child theme.
- Look for this PHP code:
<?php the_post_thumbnail(); ?>
- Save the file and test the post.
Tip: Always use a child theme to ensure future Divi updates don’t overwrite your changes.
Check Your Plugins
Some plugins, especially SEO tools or media managers, might re-add the featured image.
- Deactivate all plugins and check if the issue is resolved.
- Reactivate them one by one to identify the culprit.
- Adjust the plugin settings or turn off the feature responsible for inserting the featured image.
Use Custom CSS
For a non-invasive approach, you can hide the duplicate featured image with CSS.
- Navigate to Divi > Theme Customizer > Additional CSS.
- Add the following code:
.et_post_meta_wrapper img {
display: none;
}
- This targets the duplicate image without removing the main content.
Advanced Fixes for Developers
If you’re comfortable with coding, consider these advanced solutions:
Add a Filter in Your Child Theme
You can control how featured images are displayed by adding a filter in your theme’s functions.php file:
add_filter('et_pb_show_post_featured_image', '__return_false');
This turns off the automatic display of featured images across your posts.
Use a Custom Divi Layout
Create a custom post layout in the Divi Builder, where you control image placement. This eliminates conflicts.
How to Prevent This in the Future
- Test New Plugins/Themes on a Staging Site: Always verify changes on a staging environment before applying them live.
- Use a Child Theme: Avoid modifying core Divi files; use a child theme for all customizations.
- Stay Updated: Keep Divi, plugins, and WordPress updated to minimize compatibility issues.
Conclusion
Fixing the issue of the Divi featured image appearing twice is straightforward once you identify the root cause. The quickest solution is turning off automatic featured images in Divi’s Theme Options. For advanced users, modifying template files or adding custom filters offers more control.