Here is the code I have. It is showing 100 custom post known as campaigns. I need it to only show the current users. So author/joe should only show joe's campaigns.
<?php
if(isset($_GET['author_name'])) :
$curauth = get_userdatabylogin($author_name);
else :
$curauth = get_userdata(intval($author));
endif;
?>
<h2>Campaigns by <?php echo $curauth->nickname; ?>:</h2>
<?php
$args = array(
'posts_per_page' => 100,
'post_type' => 'campaigns'
);
query_posts($args);
if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<li>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>">
<?php the_title(); ?></a>,
</li>
<?php endwhile; else: ?>
<p><?php _e('No posts by this author.'); ?></p>
<?php endif; ?>
query_posts
, ever. Don't even use a custom query. Usepre_get_posts
to add your custom post type to the author pages