How to Create a page to display post list under a specified category

2008-05-14


1: Go to WP Administrate control panel -> Designe -> Theme Editor; 2: Open "Main Index Template (index.php)", copy its all content; 3: Open local text editor such as Notepad, paste copied content into text editor new file, save as your new WP page file name such as MyList.php; 4: At the top of this php file, add the following code: <?php /* Template Name: MyListPage */ ?>

"MyListPage" will be your page template name which is for your selection later when you create a new page; 5: Find "<?php if (have_posts()) : ?>"; Above this line, Add "<?php query_posts('showposts=20&cat=18'); ?>"; cat=18 is your specified category ID 6: FTP this php file to your remote hosting "/wp-content/themes/YOUR CURRENT THEME FOLDER NAME/; 7: Write a new page in WP, give a Title like "MyList", select page template to MyListPage, just save it; 8: Done; go to see your new page "MyList".