• hey i got this code

    <?php if (is_single()) : ?>

    • recent entries:
      <?php $latest = new WP_Query(‘showposts=5’);
      while ($latest->have_posts()) : $latest->the_post(); ?>
      <?php
      $title = get_the_title();
      if (strlen($title) >= 35)
      $title = substr($title, 0, 35) . ‘…’;
      ?>

    • “><?php echo $title; ?>
    • <?php endwhile; ?>

    <?php endif; ?>

    and i put it on my temporary site https://www.kupuj-taniej.com/absorbdesigns/

    and the recent posts only show up when you click on individual blogs. how do i make it show up on the homepage, and on every single page? this is in my side bar btw.

Viewing 1 replies (of 1 total)
  • Delete the first and last line. is_single is telling it to only display when using single.php, which is only used on single post views.

Viewing 1 replies (of 1 total)
  • The topic ‘recent posts help?’ is closed to new replies.