Skip to content

Instantly share code, notes, and snippets.

@usual-tools
Created March 4, 2014 01:50
Show Gist options
  • Save usual-tools/9338754 to your computer and use it in GitHub Desktop.
Save usual-tools/9338754 to your computer and use it in GitHub Desktop.
<?php
$posts = get_posts('numberposts=20&order=desc&cat=-37'); // 特定のカテゴリーを除外
foreach($posts as $post):
?>
<div>
<span class="meta"><?php echo date("Y/m/d", strtotime($post->post_date)); ?></span><br>
<a href="<?php the_permalink(); ?>" id="post-<?php the_ID(); ?>"><?php the_title(); ?></a>
</div>
<?php endforeach; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment