|
/ Knowledge Base /Filters/ Showing Featured Images on Protected Posts in SureMembers

Showing Featured Images on Protected Posts in SureMembers

Some users noticed that when a post is protected with SureMembers, the featured image sometimes does not appear on the front end. This happens only in a few themes, such as Kadence, GeneratePress, and Spectra.

Our team confirmed that this is not expected behavior. SureMembers should only protect the post content, not hide the featured image.

To fix this, you can add a small filter that tells SureMembers to show the featured image even when the post is restricted.

Why the Featured Image Gets Hidden

A few themes tightly control how content is displayed when a plugin restricts access. In these themes, when SureMembers protects a post, the theme may remove the featured image along with the rest of the content.

SureMembers now provides a filter that lets you override this and force the featured image to remain visible.

How to Restore the Featured Image

You can restore the featured image by adding the filter below to your site.

Step 1: Open your site’s code editor

You can add this code to either:

  • Your child theme’s functions.php file, or
  • A custom code snippets plugin like Code Snippets

Step 2: Add the filter

Copy and paste the code below:

add_filter( 'suremembers_allow_restricted_post_featured_image', '__return_true' );

Step 3: Save and test

Once saved, visit your protected post. The featured image should now appear normally, even while the rest of the content stays protected behind SureMembers.

When to Use This Filter

Use this filter if:

  • You are using Kadence, GeneratePress, Spectra, or another theme where featured images disappear after protecting a post.
  • You want your post thumbnails or banners to remain visible for design or branding reasons.

You do not need this filter if your theme already shows the featured image correctly.

Need More Help?

If the featured image still does not appear after adding the filter, or if your theme behaves differently, feel free to reach out to our support team. Sharing a short video or screenshot of your setup will help us understand the issue quickly.

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
On this page
Scroll to Top