• I know there’s an archive for each month, but is there a way for me to create my own link that will load a page with all the blog posts?

    I’ve made it so the home page only has one post showing at a time but I’d also like to have the ability to send people to an archive page with all posts. I know you can have the list of archive by month but I can’t figure out how to get it to do one mass archive of everything.

    Anyone know?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Vaughan

    (@vaughan-van-dyk)

    Hi,

    In your template, use the wp_get_archives tag along with the postbypost parameter to display a list of all blog post titles. With this tag, you can also limit the number of posts to display.

    You can read more about this tag here:
    wp_get_archives example

    Hope that helps.
    Vaughan

    I have a sitemap page, and I use the following code in this page’s template (I couldn’t figure out how to make wp_get_archives list my posts alphabetically and not by date):

    <!--- Begin sitemap-->
    <h2>Posts</h2>
    <ul>
    <?php $posts = query_posts($query_string . '&orderby=title&order=asc&posts_per_page=-1'); while (have_posts()) : the_post(); ?>
    	<li><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></li>
    	<?php endwhile; ?>
    </ul>
    <h2>Categories</h2>
    <ul><?php wp_list_categories('title_li='); ?></ul>
    <h2>Pages</h2>
    <ul><?php wp_list_pages('sort_column=post_title&title_li=' ); ?></ul>
    <!--- End sitemap-->
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Link to an archive of all posts?’ is closed to new replies.