• Hey,

    I’ve been trying for a while to figure out how to do this,

    On the first page (index.php) i want to have the first post, but when I click the permalink i want it to take me to the 2nd post on single.php. So I need a way to re-route the permalink and offset it by 1.

    This won’t work with query_posts() since it will change what will be displayed on the first page..

    Any ideas on how to do this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Place within wp loop:

    <?php $post2 = get_posts('numberposts=1&offset=1' ); ?>
    <a href="<?php echo get_permalink( $post2[ 0 ]->ID ); ?>"><?php echo $post2[ 0 ]->post_title; ?></a>

    Thread Starter knightkato

    (@knightkato)

    Thanks! Exactly what I needed. You the man!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to get permalink to the 2nd post on Index.php’ is closed to new replies.