I have this query, It's to be used in the loop, and this code works fine and does exactly what it should.
"for use in the loop, list post titles related to first tag on current post"
<?php
$tags = wp_get_post_tags($post->ID);
if ($tags) {
echo '';
$first_tag = $tags[0]->term_id;
$args=array(
'tag__in' => array($first_tag),
'showposts'=>0,
'caller_get_posts'=>0,
'order' => 'ASC' );
$my_query = new WP_Query($args); if( $my_query->have_posts() )
{while ($my_query->have_posts()) : $my_query->the_post(); ?>
(output here, just trying to save space) <?php endwhile;} } ?>
however, if i use it in the loop, (which is the only way it works) it gets picked up by the post as the_content, but not as a list, instead it shows the first full post in the list!
Any content I add to the post through the post editor is ignored. The only way to avoid it is to include this after the_content, but before the endif, does not work after the endwhile, which makes sence because that closes the main loop.
I have no problem having this query after the content, except the query displays a post list, and it needs to be at the top of the page... But then it's outside the loop? or does it just need to be after the "if have posts" and followed by "the post" ?
So I'm in a bind with this, can't help but think there must be a stock way to keep my main loop clear of the query, while keeping the query in the loop...?