The Loop doesn’t work on page templates
-
I’ve got two following problems with WordPress:
- I create template-test.php file. I put there The Loop (it should show 10 posts – it’s exactly the same The Loop like in index.php). Then I create a Page that is using this template and I don’t see 10 posts but one post and it’s not actually a post but a page linking to itself (I see page title + excerpt below it with post’s style). I don’t know why it happens but if I put EXACTLY the same code in index.php and template-test.php why do I get different output?
- The file above only works if I set permalinks to %category%/%postname%/ (or something like this). If I use standard links index.php works fine and shows 10 posts but custom page template show 404 Error.
Any help would be great!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘The Loop doesn’t work on page templates’ is closed to new replies.