Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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

highpriestess
highpriestess
5,486 Points

Where are my .php files? (art.php etc.)

I went through the steps in the previous video without any problem. However, I cannot find any of the files I see him using here: art.php etc.

Where are they? They are not in my child folder....or any of the other folders. I even searched and couldn't find them.

(I'm running WP locally. Does that make a difference? I'm starting to think that trying to follow this course while running WP locally isn't the best option.)

5 Answers

highpriestess
highpriestess
5,486 Points

I did a search on all drives and I couldn't locate art.php. However, I do see Art listed in my sidebar.

Is there a step between what's shown in the video "Setting Up Custom Post Types and Fields" and the next video "Custom Post Type Templates"?

I think there must be...because he is showing files there that do not exist on my computer:

art.php content-art.php page.php single-art.php

How did he create those files? There are no instructions on how to do this in the videos.

Also, he says to copy "files from the project downloads into our child theme directory" and by that he means these files:

art.php content-art.php page.php single-art.php

What does he mean by "project downloads"? I can't copy files that don't exist.

Remember, I'm running WP locally.

David Olson
David Olson
8,690 Points

Hey there,

This is confusing me as well... As you mentioned earlier I THINK the "project downloads" is referring to the zipped file within the "downloads" tab here on treehouse.... I also would love to know why it appears we are skipping a step here?? .... Treehouse has been so thorough that this seems out of character... though it seems this video set is relatively old...

highpriestess
highpriestess
5,486 Points

I see now that these files: art.php, content-art.php, and single-art.php are in the download files for this lesson. (Except he has a page.php file and I don't have one. Where is it? Why don't I have one?)

I guess these are the pre-made .php files that will allow this to work and that HOW to create these files will be demonstrated in videos later on?

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

Hello there,

All of the files should be located in your theme folder. I can only assume you know how to access your theme files via FTP (or on your harddive if you're running WordPress locally).

So inside your theme folder is a collection of all the php files, includes and images that make up that particular theme in your installation. It'll be in the wp-content directory.

If you can't find the file, art.php, it is possible you need to create it. art.php is probably a different template but derived from standard page.php templates in the hierarchy so it's a custom template that should appear in your theme dropdown if you've enabled that functionality.

highpriestess
highpriestess
5,486 Points

Hi!

I'm looking inside the wp-content folder...and inside there I found the theme folders and the child theme folder that I created. None of the files I created in the previous video were in there. I only have functions.php and style.css.

I can see that they should be in there from watching the video.

I DO see Art in the dashboard.

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,253 Points

Could you do a search for the files on your computer/mac? Chances are the files are there somewhere but stored in another location or perhaps hidden somehow. :-)

highpriestess
highpriestess
5,486 Points

I did a search and a I couldn't find them. (However, I have my doubts about that particular search feature. It hasn't worked in the past.)

I have a clue now about where they're located....the C drive. I'm using Rollback and whenever I restart my computer it "rolls back" to the last "snapshot"...which affects only the C drive. I just looked ....and Art is no longer there in the dashboard.

Thank you for responding. I will perform those actions again today and search the C drive another way.

If I'm running WP locally where would these files be located?