/ Published in: PHP
Just a snippet so I remember how to do a loop through just a certain category.
Expand |
Embed | Plain Text
<?php $my_query = new WP_Query('category_name=events&posts_per_page=4'); ?> <?php while ($my_query->have_posts()) : $my_query->the_post(); ?> <?php the_title(); ?> <?php the_excerpt(); ?> <?php endwhile; ?>
You need to login to post a comment.
