Title: Custom single-post pulling from wrong custom post type.
Last modified: August 22, 2016

---

# Custom single-post pulling from wrong custom post type.

 *  [jcbbuller](https://wordpress.org/support/users/jcbbuller/)
 * (@jcbbuller)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/custom-single-post-pulling-from-wrong-custom-post-type/)
 * Hello,
 * So I am setting up a custom WordPress theme using two custom post types Articles
   and News. Each one is also using a custom single-post.php page single-articles.
   php and single-news.php. But after pulling the article posts on the main page
   and inserting their permalink into a ‘Read more’ link when I click on one of 
   the article’s links it takes me to their permalink URL but instead of displaying
   the article post it displays the News post content. Both single-articles.php 
   and single-news.php are in the themes folder, not in a subfolder.
 * Here is an example of how I’m setting up the custom posts…
 *     ```
       add_action( 'init', 'articles_custom_postypes' );
       function articles_custom_postypes() {
       	$args = array (
       	'label' => $labels,
       	'public' => true,
           'menu_position' => 100,
       	'menu_icon' => 'dashicons-format-aside',
       	'label' => 'Articles',
           'has_archive' => false,
       	'supports' => array( 'title','editor', 'thumbnail'),
   
       );
   
       	register_post_type( 'articles', $args);
   
       }
       ```
   
 * On the custom single post pages I am just calling the_title(), the_content, etc.
   Should I be using a while loop or something? Any advice would be awesome. Thanks!

The topic ‘Custom single-post pulling from wrong custom post type.’ is closed to
new replies.

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [jcbbuller](https://wordpress.org/support/users/jcbbuller/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/custom-single-post-pulling-from-wrong-custom-post-type/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
