Site logo

Archived topic

Having Difficulty Disabling Featured Images on Custom Post Types

11 replies · Started by Brett on January 23, 2023

Viewing posts 1–12 of 12

Hey there, I have having a fair amount of difficulty disabling featured images on custom post types within my WordPress site. I am using WP Rocket to lazy load, and have disabled the native WordPress lazy loader within my Functions.php file.

I have tried quite a few different solutions, but am coming up short. Would you mind taking a look and letting me know what the correct class to exclude is?

An example page: https://bloggingtips.com/blog-name-ideas/ and another https://bloggingtips.com/how-to-make-money-vlogging/.

Hi Brett,

Do you want to disable the featured image or disable the lazyload of the featured image?
Let me know :)

I would like to disable the lazyload of the featured image. I need to know which class or code to exclude in WP Rocket's lazy load plugin settings

Thanks David. The problem is that I am already using that solution and it doesn't appear to be working. I've included the code in my child theme's functions.php file, as well as excluded the class within the WP Rocket excluded image section.

I've included a link to a Loom video to show you in the Private Information section.

Would you mind double-checking my link and seeing if the image is loading in some type of different way?

OK, so i can't see the first-featured-image on the img.featured-image HTML.
So either the snippet isn't working or perhaps the HTML has been cached.

Can you clear any plugin / server caches ?

I just cleared all plugin and server caches for you.

Hi Brett,

I'm not seeing the class either.

How did you add the PHP code?

I added it in the child theme's function.php file, and then excluded the class in the WP Rocket plugin. I’ve included a link to a Loom video to show you in the Private Information section.

The code doesn't work on your site, the first-featured-image class is not added to the featured image, so adding the class to WP Rocket is useless.

Some plugins or custom functions might be interfering with the code.

Can you try disabling the code in the child theme and adding the code via the code snippet plugin again?

If it still doesn't work, can you try disabling all plugins except GP premium and code snippet? And switch back to the parent theme.

Let me know!

Okay, thank you. This at least solves my issue temporarily in helping me to narrow down the issue. I'll talk to the person who built the theme and pass this information along. Thank you!

You are welcome, keep us updated!

By the way, nice site :)

This archived topic is closed to new replies.