generate_single_featured_image_output
-
Hi,
when I use the code suggested on your pages for the filter generate_single_featured_image_output it is creating a featured image, even though I have deactivated in the generatepress post settings.
add_filter( 'generate_single_featured_image_output', function( $output, $image_html ) { printf( '<div class="featured-image"> <a href="%1$s" data-fancybox="gallery"> %2$s </a> </div>', get_the_post_thumbnail_url(), get_the_post_thumbnail( get_the_ID(), apply_filters( 'generate_page_header_default_size', 'full' ), array( 'itemprop' => 'image', ) ) ); }, 10, 2 );
So I would expect the featured image will not be created when it’s deactivated. Searching for a condition I could use to evaluate the deactivation did not bring any result.
Kind regards
JoThe page I need help with: [log in to see the link]
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘generate_single_featured_image_output’ is closed to new replies.