Duplicating index.php
-
After reading several documentation resources and attempting the examples I’m stuck wondering why I just can’t get this seemingly simple task to work…
Instead of having my index.php displaying the five most recent posts, I want a custom/secondary page do so (named “Articles”).
I copy/pasted my original “index.php” as “articles.php” and on the first line I inserted:
<?php /* Template Name: Articles */ ?>
Next, in the admin, I navigated towards Write -> Write Page
I titled the page “Articles”, selected “Articles” as my template page, and published it.
When testing it out, the default loop produces only one item. Rather than listing the two “blog posts” in the database, it generates template tag outputs that relate to only the current page.
- The topic ‘Duplicating index.php’ is closed to new replies.