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

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

 
discard

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.