特定カテゴリの記事タイトルの一覧

2009.03.08

< ?php
$posts = get_posts(‘numberposts=99&category=10&order=asc’);
foreach($posts as $post) :
setup_postdata($post);
?>
<a href=”< ?php the_permalink(); ?>” id=”post-< ?php the_ID(); ?>“>< ?php the_title(); ?>
< ?php endforeach; ?>

ループの外でも機能する

Tags:

コメントは受け付けていません。