Title: Custom Post Type Posts not Displayed
Last modified: August 20, 2016

---

# Custom Post Type Posts not Displayed

 *  Resolved [Val](https://wordpress.org/support/users/vlbooth/)
 * (@vlbooth)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/custom-post-type-posts-not-displayed/)
 * _What I thought:_ Create a new CPT, use default categories and tags, and CPT 
   posts will show up like everything else. If the latest post was of CPT Articles,
   it would show up on the front page, first…
 * But no, that does not happen.
 * Clicking the one category to which a CPT Articles post is assigned yields everything
   but the CPT Articles posts!
 * Clicking either of the two tags to which my CPT Articles post is assigned yields
   anything but my CPT Article posts.
 * I can View the Post from the Admin panel.
 * I created the Custom Post Type (“Articles”) with this taxonomy:
 * `'taxonomies' => array('category', 'post_tag'), // just use default categories
   and tags`
 * and, leaving index.php, single.php and article.php in the sub-directory, I created
   and uploaded single-my_articles.php and archive-my_articles.php files with
 *     ```
       <?php /* Start the Loop */ ?>
       <?php // VAL MOD for Custom Post Type
         $loop = new WP_Query( array( 'post_type' => 'my_articles', 'posts_per_page' => 10 ) ); ?>
       <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
       <?php
         /* Include the Post-Format-specific template for the content.
          * If you want to overload this in a child theme then include a file
          * called content-___.php (where ___ is the Post Format name) and that will be used instead.  */
         get_template_part( 'content', get_post_format() );
        ?>
        <?php endwhile; ?>
       ```
   
 * **I am unable to display any of the posts I have created using this new Articles
   CPT.**
 * Full [code at pastebin](http://pastebin.com/qCmnqAzm)
 * **I am missing something very obvious…**

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/custom-post-type-posts-not-displayed/#post-2733301)
 * You need to add ‘post-formats’ to $args[‘supports’] array definition.
 *  Thread Starter [Val](https://wordpress.org/support/users/vlbooth/)
 * (@vlbooth)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/custom-post-type-posts-not-displayed/#post-2733309)
 * Thank you for replying.
 * Here is the current supports array:
    `'supports' => array( 'title', 'editor','
   comments', 'revisions', 'author', 'excerpt', 'custom-fields', 'thumbnail', 'post-
   formats' ),`
 * The posts from the Custom Post _Type_ are still not returned when I click the
   Category link the posts are associated with or when I click either of the Tags
   associated with the posts.
 * As a point of discussion, I thought child themes inherited the post _formats_
   of their parents. I am not seeing how the addition of this argument to register_post_type
   is relevant to the issue?
 *  Thread Starter [Val](https://wordpress.org/support/users/vlbooth/)
 * (@vlbooth)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/custom-post-type-posts-not-displayed/#post-2733409)
 * [@bcworkz](https://wordpress.org/support/users/bcworkz/), thank you for your 
   help.
 * I’m documenting my newbie thought process and how I found the solution for the
   other WordPress wanderers out there with the hope this makes another’s WordPress
   learning journey a little shorter.
 * > What I thought: Create a new CPT, use default categories and tags, and CPT 
   > posts will show up like everything else. If the latest post was of CPT Articles,
   > it would show up on the front page, first…
 * **What I’ve learned (so far)**: Custom Post Types (CPT) _do not_ “show up like
   everything else.”
 * **Why? Because CPT’s are not “posts.”** (Note to Dev’s: Thank you. Love you all!
   IMHO, the result of that [discussion you had about what to name this “thing”](http://core.trac.wordpress.org/ticket/9674#comment:70)
   should have resulted in “it” being named something else.
 * Logically, those who argued to keep the phrase “Custom Post Types,” are technically
   correct, while those who argued to name it _anything else_ on the grounds that
   naming it “Custom Post Type” would be confusing, were, “practically correct.”
   I know there’s a term for that but it slips my mind right now.)
 * The solution to my problem begins with understanding that Custom Post Types do
   not show up automatically like blog posts because they are not blog posts.
 * Thank you Otto for your [post about Custom Post Types](http://ottopress.com/2010/wordpress-3-0-and-custom-post-types)
   which stated…
 * > … they are still not Posts.
   >  They do not show up on the Blog. They do not appear
   > in the Feed.
 * This explains why, out-of-the-box, my shiny new CPT was not magically appearing
   on the home page of my site. This was not obvious to me and I could not find 
   anything in the Codex that said, if one creates a CPT, one will have to do some
   work to make them appear on the home page and in an RSS feed. It might be helpful
   to put that blurb in the Codex to help light the way for the unenlightened.
 * **What Solved the Problem:** Juston Tadlock’s short tutorial [Showing Custom Post Types on Your Blog](http://justintadlock.com/archives/2010/02/02/showing-custom-post-types-on-your-home-blog-page)
   solved my problem.
 * Essentially, I had to add another function to my functions.php file:
 *     ```
       add_filter( 'pre_get_posts', 'my_get_posts' );
   
       		function my_get_posts( $query ) {
   
       			if ( ( is_home() && $query->is_main_query() ) || is_feed() )
       			$query->set( 'post_type', array( 'post', 'my_articles' ) );
   
       		return $query;
       		}
       ```
   
 *  [racl101](https://wordpress.org/support/users/racl101/)
 * (@racl101)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/custom-post-type-posts-not-displayed/#post-2733591)
 * [@val](https://wordpress.org/support/users/val/) Lynn
 * Thanks for posting your experience. Justin Tadlock’s tutorial definitely helped
   me get it in perspective. I had the same problem and the code snippet fixed.
 * He’s so awesome with WordPress!
 * RC
 *  [nicholascooper](https://wordpress.org/support/users/nicholascooper/)
 * (@nicholascooper)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/custom-post-type-posts-not-displayed/#post-2733596)
 * Thank you for sharing

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Custom Post Type Posts not Displayed’ is closed to new replies.

## Tags

 * [cpt](https://wordpress.org/support/topic-tag/cpt/)
 * [custom post type](https://wordpress.org/support/topic-tag/custom-post-type/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 5 replies
 * 4 participants
 * Last reply from: [nicholascooper](https://wordpress.org/support/users/nicholascooper/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/custom-post-type-posts-not-displayed/#post-2733596)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
