Skip to content

Instantly share code, notes, and snippets.

@wp-seopress
Last active July 7, 2023 10:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wp-seopress/1b905de26415865d790c3c7a9fcb026c to your computer and use it in GitHub Desktop.
Save wp-seopress/1b905de26415865d790c3c7a9fcb026c to your computer and use it in GitHub Desktop.
Filter RSS post thumbnail size
add_filter('seopress_rss_post_thumb_size', 'sp_rss_post_thumb_size');
function sp_rss_post_thumb_size($size) {
//Will be used with wp_get_attachment_image_src() https://developer.wordpress.org/reference/functions/wp_get_attachment_image_src/
$size = 'thumbnail'; //Accepts any registered image size name (thumbnail, medium, large, full or custom size name), or an array of width and height values in pixels (in that order).
return $size;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment