Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    It seems you’ve made quite a few changes to customize the display and the look of the Related Posts on your site. Could you tell me more about the filters you’ve used and the changes you’ve made, so I can try to reproduce the issue on my end?

    Thanks!

    Thread Starter M

    (@angelxchild)

    Sure! Here are the changes I’ve made to the related post plugin, all done within my function.php file:

    
    function jetpackme_more_related_posts( $options ) {
    	$options['size'] = 4;
    	return $options;
    }
    add_filter( 'jetpack_relatedposts_filter_options', 'jetpackme_more_related_posts' );
    
    function jetpackme_remove_rp() {
    	$jprp = Jetpack_RelatedPosts::init();
    	$callback = array( $jprp, 'filter_add_target_to_dom' );
    	remove_filter( 'the_content', $callback, 40 );
    }
    add_filter( 'wp', 'jetpackme_remove_rp', 20 );
    
    function jetpackme_filter_exclude_category( $filters ) {
    	$filters[] = array( 'not' => array( 'term' => array( 'category.slug' => 'holiday',  'category.slug' => 'stuff') ) );
    	return $filters;
    }
    add_filter( 'jetpack_relatedposts_filter_filters', 'jetpackme_filter_exclude_category' );
    
    wp_deregister_style( 'jetpack_related-posts' ); 
    add_filter( 'jetpack_implode_frontend_css', '__return_false' );
    add_filter( 'jetpack_relatedposts_filter_post_context', '__return_empty_string' );
    

    Thanks!

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    Thank you!

    I believe the problem is that although the Related Posts images are 350x200px, you’re in fact asking for images that are much smaller, since you need to fit 4 of them on a single line.

    You could try to change the size of the Related Posts Images thanks to the jetpack_relatedposts_filter_thumbnail_size filter, like so:
    https://developer.jetpack.com/hooks/jetpack_relatedposts_filter_thumbnail_size/

    You could set your thumbnails to 180x103px, for example.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Related post thumbnail – low quality’ is closed to new replies.