• n the footer of my website I have a Recent Posts listing.

    On the Home Page I want it to be offset by 3 because I have the 3 most recent on the page already. But in the rest of the site, I don’t want it offset at all.

    I’m a total beginner at PHP and so some help on how to check if it’s the Home page and present the right code would be helpful!

    Currently the code for the list is:

    <ul>
          <?php
     global $post;
     $myposts = get_posts('numberposts=4&offset=3');
     foreach($myposts as $post) :
     ?>
          <li><a href="<?php the_permalink(); ?>">
            <?php the_title(); ?>
            </a></li>
          <?php endforeach; ?>
        </ul>
  • The topic ‘Offsetting navigation on Home page only?’ is closed to new replies.