It was hard making a descriptive title for this one. Here's the crux of it:
I have a page on which I display posts from a certain category. When going to the permanent link for one of these posts, I want a sidebar that displays posts from the same tag as that post (I will only need to assign one tag). Obviously, there is already a loop in the document to display the post.
I tried something like this, which seems to be the wrong approach:
$thetag = "single_tag_title();";
$postslist = get_posts('numberposts=5&orderby=date&tag=$thetag');
foreach ($postslist as $post) :
bla bla bla
<?php endforeach; ?>`