Archived topic
How to dequeue featured-images.min.css file?
9 replies · Started by Kev on September 3, 2022
Hopefully this is a simple one - I don't use featured images anywhere on the front end of my theme, so I'd like to dequeue the featured-images.min.css file.
I assume it's easily done in functions.php, but I'm not sure how.
Thanks,
Kev
Enabling reply notifications, please ignore this comment...
Hi Kev,
Please kindly check Fernando's answer here:
https://generatepress.com/forums/topic/dequeuing-css-files-like-featured-images/#post-2188172
Can't get it to work. I've tried the following, but it's still loading the stylesheet:
// Remove some of GP's stylesheets
add_action( 'wp_enqueue_style', function() {
wp_dequeue_style( 'generate-blog-images' );
} );
Hi there,
1 Enable the Blog Module.
2.Go to Customizer > Layout > Blog --> Featured images, in Archives, Posts and Pages tabs, uncheck the Display Featured Images.
Thanks David. Would doing that remove the meta entries in the header too? I’d still like to have them in there for social media etc. i just don’t display them in the front end.
I assume you're using an SEO plugin to add those meta tags ( as the Theme doesn't ).
So; No, disabling the featured image display won't affect them. It will only remove them from the front end.
That worked perfectly. Thanks, David.
Marking resolved.
Glad to hear that !