cyborg3100
Member
Posted 1 year ago #
well I am looking to use <?php wp_get_archives('type=postbypost'); ?> code in page.php file to display list of all posts. But the list of all posts is getting shown on all pages obviously which I don't want.
I just want a page /list which shows all the list of posts. How to do it ?
cyborg,
This sounds like a job for a custom page template file. Documentation can be found here:
http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates
I suggest that you copy all of the code from your theme's page.php file and paste it into a new file which you will save in your theme's directory. Then you will need to add the following to the top of the file:
<?php
/*
Template Name: Post by Post
*/
?>
Save this file and upload it to your server. Then, log into WordPress as admin and go to Manage -> Pages. Select the page that will display the list of post and scroll down until you see the "Page Template" section. Your new page template should appear in the dropdown list. Select it and save your page.
Hope this helps,
-Mike
3 months late - but thanks fields this helped!