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 WordPress Theme Development Custom Homepage Templates in WordPress A Static Homepage Template

Sam Easterling
Sam Easterling
10,216 Points

What does Wordpress consider a static page?

Does Wordpress consider a page static if it doesn't specifically contain blog posts? If I have a page with a custom post type(s), but no blog posts, does WP consider that a static page?

1 Answer

Kevin Korte
Kevin Korte
28,148 Points

Wordpress actually doesn't really care, and doesn't make this decision. You, as the developer do, and you tell WP what you want.

By convention, a static page would be a splash or welcome page, intro page, etc. These pages can have posts, or custom posts and still be considered static.

As a matter of fact, it wouldn't be unusual to have the front page have the 4 more recent posts, but still be a static front page. You set this option for wordpress, and that will dictate if wordpress grabs the front-page.php, home.php, or page.php template for that URL requested.

It's a big confusing, but once you understand the logic is there to help the developer know what template WP is going to grab it makes sense. WP doesn't actually care what's in those templates.