WordPress.org

Ready to get started?Download WordPress

Forums

Display First and Second Post on Homepage (3 posts)

  1. Subfusion
    Member
    Posted 7 years ago #

    I currently have a blog where I just need to display the first two latest posts on the homepage, the latest post has to be on the top whereas the second latest one has to be at the bottom.

    Any idea how I can do this?

    Also, below the first post there's the two latest comments relating to that post, how can I display those and truncate their entries to the first 8 words?

    This is the site I'm trying to integrate: http://xhtmlslicer.com/portfolio/a68s6e2s8e41s7f6e/

    Thanks for your help :)

  2. iLobster
    Member
    Posted 7 years ago #

    You can limit the number of posts either by modifying the query or by simply setting the number of posts to display in the wp-admin

    You'll need to call some sort of a tuned-down comment page to show only after the first post (by setting a variable in the loop that stops it for the second post)

  3. Subfusion
    Member
    Posted 7 years ago #

    The thing is on the archive page I would like to display the latest 10 posts, so for the homepage I'll need to create some custom queries.

    Can anyone provide me a link to some documentation and tutorials helping you to achieve the post idea and the comment idea?

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic