Forums

Retrieve Blog Post with offset=1 (2 posts)

  1. ivorpad
    Member
    Posted 2 years ago #

    Hi, I have a problem here, how can I get an specific single post for a "recent news" with offset... I've made a mistake here?

    <?php
    // Begin Blog Loop
        $get_news = new WP_Query( 'showposts=2&cat='.get_cat_id( get_option(       'blog_cat' ) ).'&offset=1' );
        while ($get_news->have_posts()) : $get_news->the_post();
    ?>
  2. f00bar
    Member
    Posted 2 years ago #

    Offset determines which post you want to start from, 0 being the first one. If you want to get a specific single post, you would surely want to specifiy the post id?

Topic Closed

This topic has been closed to new replies.

About this Topic