WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm building a website in which there is a page where I collect a list of works/projects; I created a file called work.php where I made the template of this page, but when I try to view a single custom post (when I press on a single item), it says that the page doesn't exist.

Then, my question is: do I have to create a custom template like work-post.php for the custom post or do I have to use single.php?

P.S. I'm using a custom post called work type I made.

share|improve this question
It isn't clear what you are doing. Do you have a CPT called "work"? – s_ha_dum Dec 29 '13 at 17:26

If you CPT is called "work", i.e. you have registered it using

register_post_type('work', $args);

you have to create a file called 'single-work.php' and that will be used to show the singular work post.

If you don't create that file the file 'single.php',if present, will be used by WordPress. If even the 'single.php' does not exist in your theme, then the 'index.php' file will be used.

Please see WordPress Template Hierarchy on Codex for more info.

share|improve this answer

You have to create a custom single page file. Or search about template post in wordpress.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.