• Hi everyone! I’m a total WordPress noob, but long time developer and I have a pretty good understanding of PHP. Just new to template tags, templates, The Loop, etc..

    Let’s say I have 10 posts, all structurally identical. Each post consists of a heading, a paragraph or two of copy, and one large image which stretches across the width of the page (960px).

    Now, what I want to achieve on the home page is to show the image of the most recent post with its full content directly below. Then below that show each of the other posts, without their images or with thumbnail versions of their images. Then when the viewer clicks on one of the older posts they are shown the single.php template which shows them the big image for that specific post, all of the post’s content, and any comments which may have been made.

    If you’re confused, maybe take a look at the site which I am re-doing in WP: http://balsi.be/home

    So that is the home page. The large photo with the two dudes should belong to the post entitled “vom Ball zum Pögg”. Now if I click on “Balsi gewinnt Krebsliga-Pitch” I’d like to see the big image for that post and only that post’s content, along with comments for that post.

    Anyone get what I’m after? More importantly can anyone shove me in the right direction?

Viewing 1 replies (of 1 total)
  • Hi

    You need two loops on your page. The first to pull in the most recent post and display its image.

    The next one would display the rest of the posts you want on that page, and not display their image.

    Its good practice to use only one official loop on a page. The others can use the get_posts function.

    You can look at query_posts() to see how to tell the loop to display only one post
    http://codex.wordpress.org/Template_Tags/query_posts

    and get_posts to see how to set up a second loop
    http://codex.wordpress.org/Template_Tags/get_posts

    there is a query parameter called “offset” to tell the 2nd loop to skip over the 1st post and start with the 2nd post. Its documented on those pages.

Viewing 1 replies (of 1 total)
  • The topic ‘How can I display most recent post/image and list all others with a thumbnail?’ is closed to new replies.