• jimmykup

    (@jimmykup)


    Hi everyone,

    My apologies if this isn’t the correct forum for this. This is my first time posting on these forums, so please bear with me.

    I’m trying to figure out how to add a listing of my most recent posts to the single.php page. I want the 15 most recent posts to be generated in my footer. Here’s a snapshot of what I have in mind.

    http://jameskupczak.com/wordpress-01.jpg

    But as you can see in the above image, I would also like that each post be represented only by their thumbnail image. (In this case it would be sized down to 50×50.)

    Can anyone assist me in figuring this out? Your help would be greatly appreciated. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • You will have to generate a new loop to pull your recent posts. Look into the WP_Query object. There are quite a few examples starting about 1/6th down the page.

    Hi Jimmy,
    Welcome to the forums.

    I have had a look at this as I have a hobby website where I post WordPress tutorials and this would be a nice addition to any toolbox.

    Rather than WP_Query you can use Get_Posts as you are calling the image ribbon outsite the loop.

    There are (YARPP) related posts plugins like this out there, these will display related posts without coding.

    I am not sure if the related posts plugins have a setting for latest posts thumbnails.

    If you really want a code solution so you can build it into your theme, I took your idea and created a post using a template part that you can add with a line of code.

    I added the code to a twenty ten child theme and you can download this child theme from the post.

    HTH

    David

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding a List of Recent Posts to single.php?’ is closed to new replies.