The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Latest Posts by Author
[resolved] Adding a photo (3 posts)

  1. spultured
    Posted 3 years ago #

    Let me preface this by saying I am a wordpress newbie. I can't for the life of me figure out how to insert a thumbnail with the post links which I am inserting onto a page. Could someone please show me the exact code which would enable me to do this? Much appreciated :)


  2. Alex Mansfield
    Plugin Author

    Posted 3 years ago #

    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: http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail

  3. Alex Mansfield
    Plugin Author

    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Latest Posts by Author
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.