Support » Plugin: Latest Posts by Author » Adding a photo

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Alex Mansfield


    Adding the following code to the functions.php file of your theme will add thumbnail support to the plugin:

    function latestbyauthor( $content ){
    	global $post;
    	return $content . get_the_post_thumbnail( $post->ID );
    add_filter( 'latestbyauthor_link_before', 'latestbyauthor' );

    I’m not sure where you want the thumbnails to be placed, but you can play around with the placement by changing “latestbyauthor_link_before” to any of the following values:

    • latestbyauthor_link_before
    • latestbyauthor_title_before
    • latestbyauthor_title_after
    • latestbyauthor_link_after

    To change the thumbnail size, you’ll need to tell the “get_the_post_thumbnail” function what size image you want to use. For more information on that function, see:

    Plugin Author Alex Mansfield


    Marking as resolved. Let me know if you have any further questions.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding a photo’ is closed to new replies.