I\'ve written some code which automatically creates some posts and adds a tag to them. I can see the tags in the \'All posts\' admin panel and I can click on the posts \'Ta
Try this
$original_query = $wp_query;
$wp_query = null;
$args=array('posts_per_page'=>5, 'tag' => $brand_name);
$wp_query = new WP_Query( $args );
if ( have_posts() ) :
while (have_posts()) : the_post();
echo '- ';
the_title();
echo '
';
endwhile;
endif;
$wp_query = null;
$wp_query = $original_query;
wp_reset_postdata();