1

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,

1

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.

| 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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.