Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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