php - wordpress display posts from particular category AND tag -
this must possible haven't been able find documentation on it. i'm trying display posts category , tag. this:
if (in category 'featured' , has tag 'gcse') { output 3 recent posts } this lame attempt, won't work:
<?php get_the_category() $args = array('tag_slug_' => array('gcse'),category=featured); $postslist = get_posts( $args ); foreach ($postslist $post) : setup_postdata($post); ?> <ul> <li><?php the_title(); ?></li> </ul> <?php endforeach; ?> thanks
i got it...
<?php $postslatest = get_posts('&tag=gcse&category=24&numberposts=3'); foreach($postslatest $post) { ?> <h4><a href="<?php the_permalink() ?>" target="_parent"><?php the_title(); ?></a></h4> <?php } ?>
Comments
Post a Comment