Created
October 23, 2017 09:14
-
-
Save rotisoft/b713b635550dd74347c64c0783571ef8 to your computer and use it in GitHub Desktop.
Disable srcset for one thumbnail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'wp_calculate_image_srcset_meta', '__return_null' ); | |
echo get_the_post_thumbnail( $page->ID, 'large' ); | |
remove_filter( 'wp_calculate_image_srcset_meta', '__return_null' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment