Output all EXCEPT the first post? (4 posts)

  1. fender967
    Posted 7 years ago #

    I want to create a blog where the newest post is featured with a large picture and the rest of the posts are below with smaller pictures. I know how to do the pictures using custom fields, but I can't figure out how to leave out the newest post (which will be right above them) when I am querying/displaying the list of posts.

    The only way I have seen this done in any free themes is by actually having the main post be from a different category than the rest. This won't work because when the next post is added, the old feature will not move to the top of the regular list of posts. I guess you could just change the category of the feature post to a normal post each time you make a new post but I'm hoping there is a way to query all but the newest post.

    Here is an example of what i'm talking about: http://michaelhutagalung.com/arthemia/

    Anyone know how to do this?

  2. Sakshin
    Posted 6 years ago #

    I'm curious too about how to deal with this subject. I'm using 2.8.4

  3. Sakshin
    Posted 6 years ago #


  4. Sakshin
    Posted 6 years ago #

    I got it. Although I only show excerpts, it doesn't show the last one by the 'offset'.

    <?php if ( is_page('3') ) { ?>
    <?php $my_query = new WP_Query('category_name=vip&showposts=18&offset=1');
    while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <?php the_excerpt(); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic