WordPress.org

Ready to get started?Download WordPress

Forums

How to exclude Custom Post Type from Author Template? (1 post)

  1. wadams92101
    Member
    Posted 2 years ago #

    I'm using an author template based on WordPress's sample author template to display my authors' bios. I have a custom post type called Shorts. The author template displays a list of my authors' posts, which I believe (i'm not a dev - don't know php) is the result of the following in the author.php file:

    <?php 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>,
                <?php the_time('d M Y'); ?> in <?php the_category('&');?>
            </li>
    
        <?php endwhile; else: ?>
            <p><?php _e('No posts by this author.'); ?></p>
    
        <?php endif; ?>

    Problem is, I don't want it to list the custom post type shorts. What do I add (and where) to leave out my custom post type (shorts)?

Topic Closed

This topic has been closed to new replies.

About this Topic