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

Adam Smallman
Adam Smallman
4,182 Points

.php files orders

Hi guys, just started with Wordpress, going well so far, but I have a question.

During the video we must create a number of .php files to go into the folder.

I am just a little confused, how do we know what .php goes with what page?

I know about wordpress uses front_page.php first.

But there is files such as home.php, page.php, etc

What I wanted to know is, could we make a wordpress website from using more....vanilla names?

such as contact.php for the contact page about.php for the about page pictures.php for the pictures page etc.

I am not understanding how I am going to use the page.php to effect other pages. and etc.

but anyway is this the way it HAS to be with wordpress?

Its a little confusing to understand at first.

Just to make this easier to understand,

I wanted to just create a simple html like structure with wordpress.

such as

index.php, aboutme.php portfolio.php and contact.php

is this possible to do?

Thanks guys,

Confusing to understand at this hour of the morning!

1 Answer

The file names in Wordpress are used to control specific templates so you wouldn't necessarily want to create a file named contact.php. Instead you would have a file called page.php and then create pages in the Wordpress Admin interface - Contact. It would be displayed at http://www.yoursite.com/contact and use the page.php template file to layout the page. This is also true for other pages and you can have custom templates for pages, but that would take a while to explain - there are good courses on Treehouse to learn all of this.

You can also read about how Wordpress uses file names to figure out which template to use for different pages here:

http://codex.wordpress.org/Template_Hierarchy

Adam Smallman
Adam Smallman
4,182 Points

I thought so, Wordpress seems like a very powerful tool, it seems to have a big learning curve to it. I don't think its overly complicated but, its a little confusing.

Thanks Jeff