Author Custom Post Types

Am setting up an author page and would like to show all of their posts in a certain custom post type. Just their posts and probably only the first 10.

Thanks in advance for the help!

  • Eric G.

    Thanks!

    It worked great but I have one little tweak I would like to do. I would like to show the 10 most recent SHOP products and then show the 10 most recent posts from the sites blog. I was able to get both working when I do the query second. Is there a way to cancel the query or another form of code I should be using so I can query one loop and then use posts.

    This is what I have right now. But I want to swap the two.

    <!-- Filter and Show Author's Free Resources -->
    
        <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    	<h3>Free Youth Ministry Resources Provided by <?php echo $curauth->first_name; ?>:</h3>
            <li>
                <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>">
                <?php the_title(); ?></a>,
                <?php the_time('d M Y'); ?> in <?php the_category('&');?>
            </li>
    
        <?php endwhile; else: ?>
    	<h3>Free Youth Ministry Resources Provided by <?php echo $curauth->first_name; ?>:</h3>
            <p><?php _e('This youth worker has not posted any free resources yet...'); ?></p>
    
        <?php endif; ?>
    
    <!-- Filter and Show Author's Shop Products -->
    	 	<?php	global $wp_query;
    query_posts( array(
        'post_type' => 'ShopResources' ,
        'author=' . $authorid,
        'showposts' => 10 )
    ); ?>
    
     <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    	<h3>Free Youth Ministry Resources Provided by <?php echo $curauth->first_name; ?>:</h3>
            <li>
                <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>">
                <?php the_title(); ?></a>,
                <?php the_time('d M Y'); ?> in <?php the_category('&');?>
            </li>
    
        <?php endwhile; else: ?>
    	<h3>Free Youth Ministry Resources Provided by <?php echo $curauth->first_name; ?>:</h3>
            <p><?php _e('This youth worker has not posted any free resources yet...'); ?></p>
    
        <?php endif; ?>

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.