Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress How to Make a Website with WordPress Custom Post Types and Fields in WordPress Custom Post Type Templates

Kimberly Ludwikoski
Kimberly Ludwikoski
814 Points

No new template available when adding a new page to display custom post types.

I am following along with the video, while making changes to my own (live) website, birchavenuedesign.com. I added both plug-ins, added a custom post type called 'portfolio_entry', added the custom fields, and added a couple of posts. When I try to add a page, and select the template from the drop-down menu, it does not exist. Where have I gone wrong?

When you show the transferring of the art.php, single_art.php, etc. files, I looked for those files on my live site and could not find them. Could this be the problem? Where would mine be? I checked the parent & child theme folders, and do not see the files.

3 Answers

Shawn Flanigan
PLUS
Shawn Flanigan
Courses Plus Student 15,815 Points

Kimberly: It sounds like you've figured our the problem! He goes through it pretty quickly at the beginning of the video (within the first 20 seconds or so), but you should be uploading those files to your server. First, go back to the video and click the Downloads tab below the video player. You should see a zipped Project Files folder. Download the .zip file and open it up. You should see 3 files:

  • art.php
  • content-art.php
  • single-art.php

You'll need to upload these 3 files (either through an FTP client or your hosting provider's cPanel) into your child theme's folder.

Hope this helps!

Kimberly Ludwikoski
Kimberly Ludwikoski
814 Points

But if I am making my own similar updates to my live website, the new files should be there vs. having to upload them, correct? But they are not. This is where I am getting confused.

Shawn Flanigan
Shawn Flanigan
Courses Plus Student 15,815 Points

Kimberly: I'm not sure I understand your question fully, but these 3 files are additional, custom files that you're adding to your WordPress child theme. As such, they won't be there until you add them.

Kimberly Ludwikoski
Kimberly Ludwikoski
814 Points

OK, now I see why you didn't understand my question. It really didn't make any sense! I ran through all the lessons again, and now I understand. You really do have to create the template files, or FTP them over. Thank you for your help!