• Anyone know how I can make a page that will show the title (and link to) all my posts?

    I have it working nicely in my sidebar, but I’ve limited it to the 20 most recent posts. Now I’d like to create a separate page with links to ALL my posts on it – kind of like a sitemap.

    This is the code I’m using in the sidebar – just incase it’s any use:

    • <h2>Recent posts</h2>
      <?php $my_catposts = new WP_Query(‘showposts=20’); ?>
      <?php while($my_catposts->have_posts()) : $my_catposts->the_post(); ?>
      <li class=”page_item”>“><?php the_title(); ?>

    <?php endwhile; ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter kerosene

    (@kerosene)

    Thanks, that’s a cool plugin – but it’s overkill for what I need. I’ve installed it and hacked it up to look how I want, so I’m happy, and the job’s done – but I’d really like to use a few lines of php in my ‘pages.php’ file instead.

    I was think I could just make an empty ‘archives’ page in WP, then in page.php I can use is_page(‘archives’) to detect that it’s my ‘archive’ page, and then grab all my posts and echo them out. I just don’t know the WP code to get all posts.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sitemap page that shows ALL posts?’ is closed to new replies.