Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Here is an example of output by slug (label):
$slug='default';
if($slug){
$arg=array('category_name'=>$slug,'posts_per_page'=>3,);
$catquery = new WP_Query($arg); ?>
<?php while($catquery->have_posts()) : $catquery->the_post(); ?>
<h3><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
<div><?php the_excerpt(); ?></div>
<?php endwhile;wp_reset_postdata();
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question