Forums
Forums / Fixing WordPress / How To Include ONLY A Category
(@thedert)
10 years, 5 months ago
Client’s wordpress is pretty customized and has had tons of stuff gutted and only functions can really be used. Any idea how to customize this:
<?php the_widget( ‘WP_Widget_Recent_Posts’ ); ?>
to only display a certain category?
<?php $catquery = new WP_Query( ‘cat=1&posts_per_page=10’ ); while($catquery->have_posts()) : $catquery->the_post(); ?>
<?php endwhile; ?>
The topic ‘How To Include ONLY A Category’ is closed to new replies.