Title: Custom Post Types &#039;single-type.php&#039; not working
Last modified: August 19, 2016

---

# Custom Post Types 'single-type.php' not working

 *  Resolved [melee-viii](https://wordpress.org/support/users/melee-viii/)
 * (@melee-viii)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/custom-post-types-single-typephp-not-working/)
 * For my website I want to make use of the Custom Post Types functions and give
   these custom posts a different look. I made the custom post type with the following
   code in my functions.php:
 *     ```
       add_action('init', 'digest_register');
   
       	function digest_register() {
           	$args = array(
               	'label' => __('digest'),
               	'singular_label' => __('digest'),
               	'public' => true,
               	'show_ui' => true,
               	'capability_type' => 'post',
               	'hierarchical' => false,
               	'rewrite' => array( 'slug' => 'digest', 'with_front' => false ),
               	'supports' => array('title', 'editor', 'thumbnail', 'excerpt', 'thumbnail')
               );
   
           	register_post_type( 'digest' , $args );
       	}
       ```
   
 * I have made a ‘single-digest.php’ but when I go to a post’s URL I see the homepage.
 * Anyone that can tell me what I should do to make the single post page work?

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

 *  [wishypw](https://wordpress.org/support/users/wishypw/)
 * (@wishypw)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/custom-post-types-single-typephp-not-working/#post-1759817)
 * i’m also having this problem. but slightly different;
 * As well as the single-customposttype.php files, I also have a single.php in my
   theme directory which as a routing rule for the different post types to point
   to a different single file.
 * Strangely, one single works yet the other doesn’t any ideas?
 *  [benzine](https://wordpress.org/support/users/benzine/)
 * (@benzine)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/custom-post-types-single-typephp-not-working/#post-1759818)
 * You should duplicate the page.php and give it the name page-yourpost.php and 
   add this line of code on top for WP to recognize it as a template file
 *  * Template Name: your post name Template
 * add this before the loop
 * <?php query_posts(array(‘post_type’=>’your post’)); ?>
 * You’ll have the custom post type being created in your admin. Create a page and
   then assign the page to page-yourpost.php from the drop down list under Page 
   attributes and you’re done
 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/custom-post-types-single-typephp-not-working/#post-1759819)
 * or wait for WP 3.1
 * when you can just use archive-post_type.php, and turn archives on in your CPT,
   and be done with it! No custom queries
 * [http://mark.mcwilliams.me/2010/10/wordpress-3-1-introduces-custom-post-type-archives/](http://mark.mcwilliams.me/2010/10/wordpress-3-1-introduces-custom-post-type-archives/)
 * (@ benzine, you need to include pagination in your query… [http://www.rvoodoo.com/projects/wordpress/wordpress-tip-fixing-pagination-on-custom-queries-with-query_posts/](http://www.rvoodoo.com/projects/wordpress/wordpress-tip-fixing-pagination-on-custom-queries-with-query_posts/))
 *  [wishypw](https://wordpress.org/support/users/wishypw/)
 * (@wishypw)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/custom-post-types-single-typephp-not-working/#post-1759820)
 * thanks guys, i’ll give your suggestions a go and let you know!
 *  [benzine](https://wordpress.org/support/users/benzine/)
 * (@benzine)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/custom-post-types-single-typephp-not-working/#post-1759821)
 * @ Rev. Voodoo
 * Can you pls help me on this issue
 * **[http://wordpress.org/support/topic/one-and-two-columns-posts-on-the-same-page?replies=7#post-1849587](http://wordpress.org/support/topic/one-and-two-columns-posts-on-the-same-page?replies=7#post-1849587)**
 * I’m stuck here!!!
 * Waiting for your feedback
 * Thanks
    Ben
 *  [justtj](https://wordpress.org/support/users/justtj/)
 * (@justtj)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/custom-post-types-single-typephp-not-working/#post-1759855)
 * I had similar issue, and spent few hours trying to figure out why.
 * In end realized that when we add a custom post type, the .htaccess file doesn’t
   update the permalink structure.
 * So just update the permalink structure {switch to something else and back again}
   and everything will work fine.
 * cheers!
 *  [Blizzie](https://wordpress.org/support/users/lizzbernardo/)
 * (@lizzbernardo)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/custom-post-types-single-typephp-not-working/#post-1759868)
 * I have the same issue. I want custom post type to have different template when
   viewed individually. I am using magazine-basic as my theme and all codes for 
   single.php and etc. are in the loop.php Can’t seem to figure how to tweak it.
   Please help. Thanks!

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

The topic ‘Custom Post Types 'single-type.php' not working’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 6 participants
 * Last reply from: [Blizzie](https://wordpress.org/support/users/lizzbernardo/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/custom-post-types-single-typephp-not-working/#post-1759868)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
