The Loop in page.php and other templates
-
Hey all
I have a loop which is on page.php to call the content for all single pages. This works fine on all pages such as /about/, /contact/, /links/ etc. These pages are set to “default template” and call the page title and content i.e.
About us
This is the about us page
However I have another section of the site where I will use a different template and have set these pages to use my own custom template file.
My template file is identical to page.php (for now anyway) yet all the pages using the template file call the POSTS from the loop i.e.
Hello world!
Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
…not the Page (as above.)
Am I missing something which makes my template work differently to the default template?
The template file when used is also not picking up any of my ‘is_home’ conditions – almost as if WP is assuming the template is the home page.
Any help much appreciated.
- The topic ‘The Loop in page.php and other templates’ is closed to new replies.