SHARE
TWEET

Untitled

a guest Jun 19th, 2017 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <div id="newspage">
  2.  <?php
  3.  $lastposts = get_posts('numberposts=5&category=1');
  4.  foreach($lastposts as $post) :
  5.     setup_postdata($post);
  6.  ?>
  7.  <h1><a href="<?php the_permalink(); ?>" id="post-<?php the_ID(); ?>"><?php the_title(); ?></a></h1>
  8.  <small>Published on</small>
  9.  <date><?php the_time('F j, Y') ?>.</date>
  10.  <h4><?php the_content(); ?></h4>
  11. <?php endforeach; ?>
  12. </div>
RAW Paste Data
Top