- This topic has 11 replies, 3 voices, and was last updated 3 years, 3 months ago by
Ying.
-
AuthorPosts
-
January 23, 2023 at 3:14 pm #2506469
Brett
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/.
January 23, 2023 at 3:39 pm #2506487Ying
StaffCustomer SupportHi Brett,
Do you want to disable the featured image or disable the lazyload of the featured image?
Let me know 🙂January 24, 2023 at 7:56 am #2507377Brett
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
January 24, 2023 at 8:11 am #2507403David
StaffCustomer SupportHi there,
see my reply here:
https://generatepress.com/forums/topic/my-page-speed-is-low-how-do-i-fix-it/#post-2276285
January 24, 2023 at 8:30 am #2507436Brett
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?
January 24, 2023 at 8:56 am #2507467David
StaffCustomer SupportOK, so i can’t see the
first-featured-imageon theimg.featured-imageHTML.
So either the snippet isn’t working or perhaps the HTML has been cached.Can you clear any plugin / server caches ?
January 24, 2023 at 9:07 am #2507481Brett
I just cleared all plugin and server caches for you.
January 24, 2023 at 9:56 am #2507539Ying
StaffCustomer SupportHi Brett,
I’m not seeing the class either.
How did you add the PHP code?
January 24, 2023 at 10:13 am #2507564Brett
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.
January 24, 2023 at 10:40 am #2507600Ying
StaffCustomer SupportThe 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!
January 24, 2023 at 11:08 am #2507639Brett
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!
January 24, 2023 at 11:14 am #2507658Ying
StaffCustomer SupportYou are welcome, keep us updated!
By the way, nice site 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.