<?php
global $wp_query;
query_posts(
array_merge(
array('showposts' => -1),
array('offset'=>1),
$wp_query->query
)
);
?>
Showing posts with label Archives. Show all posts
Showing posts with label Archives. Show all posts
Sunday, April 26, 2009
Show all posts in a category in the Archives page
Dump this code in the Archives template before the loop.
Thursday, January 1, 2009
How to create WordPress Archives page
To create an archives page for WordPress, you can use the Page Template feature. Here are the steps:
Now, you already have an archives page by month and by subject/category. By the way, you could also have the archives page to display some or all posts title, as discussed in this article.
- Create an empty file—using your favourite text editor— in your theme folder, and name it archives.php, or whatever you like.
- Append these codes inside archives.php.
<?php
/* Template Name: Archives */
?>
<?php get_header(); ?>
<div id="archives">
<h2>Archives by Month:</h2>
<ul> <?php wp_get_archives('type=monthly'); ?> </ul>
<h2>Archives by Subject:</h2>
<ul> <?php wp_list_cats(); ?> </ul>
</div>
<?php get_footer(); ?> - Create a new page in WordPress, and name it Archives.
- Change the Template Attributes for Archives page, which is usually located at the right hand side of the Edit Page page, to Archives (The name will depends on the template name).
- Click on the Update Page button to save.
Now, you already have an archives page by month and by subject/category. By the way, you could also have the archives page to display some or all posts title, as discussed in this article.
Subscribe to:
Posts
(
Atom
)