Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

This may sound like a stupid / noob question. But I'm curious to wonder as to why you can't insert the wordpress php loop functions outside into say a blog.php file but you can in a index.php file?

For instance, when I try running all the loop code in say a blog.php file, and linking the pages up nothing shows. I've tinkered with the reading settings as well just to make sure nothing is off. However, when I move the loop php code into an index.php file the blog page will then display the pages.

Am I missing something, or is there a way to insert the loop into a different .php file instead of the index?

-Thanks,

share|improve this question

1 Answer 1

up vote 1 down vote accepted

That's because of the Template Hierarchy WordPress uses. The blog.php you're trying to use isn't part of the default templates WordPress uses.

share|improve this answer
    
Thanks! I'll have to fiddle around with the codex a little more :) –  Monstr92 Sep 24 '12 at 19:23

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.