This is my problem...
In the main content section of a custom single7.php template is the Post Title
<?php the_title(); ?> and the name of the author who wrote the post:
<?php the_author(); ?> which sits inside the Loop.
In the sidebar (custom sidebar-2.php template) I use this code to hightlight the current author's name and OTHER post links drawn from a SPECIFIC category (cat 7) for further reading.
<?php query_posts('cat=7&author=' . $post->post_author . '&order=ASC&showposts=-1'); ?>
<p class="subheading">All Titles by:
<?php if (have_posts()) : ?>
<?php the_author(); ?></span>
<?php while (have_posts()) : the_post(); ?>
<?php the_permalink(); ?>">
<?php the_title(); ?>
<?php endwhile; ?>
<?php else: ?>
<?php endif; ?>
This is my problem. I've discovered that when Category 7 has but ONE author this code works beautifully.
But if there are multiple authors (ie: more than one) in the same category (ie:Cat 7) then this code displays an alphabetical author name first (I guess because ASC was stipulated) NOT the RIGHT author name.
In this case there were two (2) authors who have posted to Category 7.
The owner of the post in question is Michelle (P), which was displayed appropriately in the content section but in the sidebar the author's name was Moning (M) which isn't correct. It should have been Pillow, as in keeping with the current author name.
Interestingly enough, the Post Links in the sidebar were correct based off Single Page View: Pillows (P).
Can someone PLEASE tell me how I can fix this code to show the current author's name in the sidebar (sorta "echoed"), along with a list of random post titles drawn from a specific category.