Skip to content

Instantly share code, notes, and snippets.

@ChangJoo-Park
Created August 27, 2013 00:18
Show Gist options
  • Save ChangJoo-Park/6348290 to your computer and use it in GitHub Desktop.
Save ChangJoo-Park/6348290 to your computer and use it in GitHub Desktop.
<?php
/*
Template Name: All posts
*/
?>
<?php
$debut = 0; //The first article to be displayed
?>
<?php while(have_posts()) : the_post(); ?>
<h2><?php the_title(); ?></h2>
<ul>
<?php
$myposts = get_posts('numberposts=-1&offset=$debut');
foreach($myposts as $post) :
?>
<li><?php the_time('d/m/y') ?>: <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ul>
<?php endwhile; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment