Forums

[resolved] Is there a plugin to show all the posts on a page? (3 posts)

  1. Nail Yener
    Member
    Posted 2 years ago #

    Hi,

    I want to have links to all my posts on a page, is there a plugin to do that?

  2. MichaelH
    Volunteer
    Posted 2 years ago #

    Plugins that might help:
    http://wordpress.org/extend/plugins/query-posts/
    http://wordpress.org/extend/plugins/wordpress-loop/

    But you can also put this in a template, such as a page template to get the desired result:

    <?php
    $args=array(
      'post_type' => 'post',
      'post_status' => 'publish',
      'posts_per_page' => -1,
      'caller_get_posts'=> 1
    );
    $my_query = null;
    $my_query = new WP_Query($args);
    if( $my_query->have_posts() ) {
      echo 'List of Posts';
      while ($my_query->have_posts()) : $my_query->the_post(); ?>
        <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
        <?php
      endwhile;
    }
    wp_reset_query();  // Restore global post data stomped by the_post().
    ?>
  3. Nail Yener
    Member
    Posted 2 years ago #

    Thank you very much Michael.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags