Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

INdex.php, page.php and single.php all three files under the theme folder have the Loop to check for posts.

Which one get execute first, and the next?

What's sequence for Wordpress to read those files?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

In general, the most specific template will be used first if it's available, then WordPress will try the others. It depends on what thing you're looking at (post, page, taxonomy, etc) and where your're looking at it (archive, single).

This is all explained in detail by the Template Hierarchy.

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.