• I want to pull the second post from the specific categories used in the slider on my site. Currently it pulls only the first post from the categories I choose to display on the slider. I was wondering if there is a way to display only the second most recent post in the slider. Below is the code for the slider. Thanks!

    <!–BEGIN FEATURED POSTS–>
    <ul id=”slider-nav”>
    <?php $i = 0; $slider_query = new WP_Query(“showposts=4&cat=14,16,13,18”); ?>
    <div id=”slider-posts”>
    <?php global $wp_query;query_posts(array_merge(array(‘offset’ => 1),$wp_query->query));?>
    <?php $i++; ?>
    <div class=”slide”>
    <div class=”slide-thumbnail”>
    <?php get_the_image( array( ‘custom_key’ => array( ‘photo-medium’ ), ‘default_size’ => ‘590×400’, ‘width’ => ‘590’, ‘height’ => ‘400’, ‘image_class’ => ” ) ); ?>
    </div>
    <div class=”slide-details”>
    <h2>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></h2>
    <div class=”description”>
    <p><?php echo substr(get_the_excerpt(),0,180); ?>…</p>
    </div>
    </div>
    <div class=”clear”></div>
    </div>
    <?php endwhile; wp_reset_query(); $i = 0; ?>
    </div>

  • The topic ‘Pulling Specific Posts to Slider on Homepage’ is closed to new replies.