WordPress: How to create a page that displays a specific category archive
Quick way to display a “Category archive” as a page in WordPress
- In your wp-content/themes folder, copy the “category.php” file to “template-categorypage-categoryname.php”.
- Edit the template-categorypage-categoryname.php.
- Add
<?php /** * Template Name: CategoryName Category page
to the top of the page.
- After the first
?>
tag, add
<?php query_posts('cat=[categoryid]&posts_per_page='.get_option('posts_per_page')); ?>
Where [categoryid] is your WordPress numeric category ID.
- Create a new page and choose the template “CategoryName Category page” from the page attributes sidebar widget.