WordPressで特定のカテゴリの最新記事を表示

WordPressで特定のカテゴリの最新記事を表示する方法

		<ul class="sidemenu">
			<?php
			$my_query = new WP_Query('cat=1&showposts=10');
			while ($my_query->have_posts()) : $my_query->the_post(); ?>
			<li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li>
			<?php endwhile; ?>
		</ul>

Copyright © All Rights Reserved · Green Hope Theme by Sivan & schiy · Proudly powered by WordPress