Jetpack Related Posts are nice. You must use them!
They’re additionally customizable; we added a number of filters to permit you to customise the output of the Associated Posts. You’ll find numerous examples right here: Customize Related Posts (Kudos to Xiao for all the good work he is achieved with Jetpack Associated Posts).
The module additionally consists of an choice to “use a big and visually hanging format”. When that choice is lively, Jetpack will search for a big picture (at the least 350*200px) in your posts, and use that picture when displaying Associated Posts. It seems to be nice, and I apply it to this website:
What does not look that good, nevertheless, is when a number of the Associated Posts have no picture.
There are 2 methods to unravel this small concern.
Add a default picture that can be utilized by all Associated Posts that do not embrace a picture
You should use the jetpack_images_get_images filter (reference) to outline a default picture that shall be utilized by the Associated Posts and by different providers like Fb or Twitter.
Right here is how you possibly can outline your personal default picture:
perform jeherve_custom_image( $media, $post_id, $args )
if ( $media )
return $media;
else
$permalink = get_permalink( $post_id );
$url = apply_filters( 'jetpack_photon_url', 'YOUR_LOGO_IMG_URL' );
return array( array(
'sort' => 'picture',
'from' => 'custom_fallback',
'src'
The post Jetpack: learn how to cope with lacking pictures within the Associated Posts module appeared first on DICKLEUNG DESIGN 2014.

沒有留言:
張貼留言