Skip to content

Instantly share code, notes, and snippets.

@kopepasah kopepasah/6016.md

Last active Oct 10, 2018
Embed
What would you like to do?
Change Jetpack's Related Posts Thumbnail Size

Change Jetpack's Related Posts Thumbnail Size

Full tutorial can be found on kopepasah.com.

License

GNU General Public License v2 or later.

This code is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Learn, use, share and enjoy!

<?php
/**
* Filter Jetpack's Related Post thumbnail size.
*
* @param $size (array) - Current width and height of thumbnail.
* @return $size (array) - New width and height of thumbnail.
*/
function custom_jetpack_relatedposts_filter_thumbnail_size( $size ) {
$size = array(
'width' => 600,
'height' => 450
);
return $size;
}
add_filter( 'jetpack_relatedposts_filter_thumbnail_size', 'custom_jetpack_relatedposts_filter_thumbnail_size' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.