+ Reply to Thread
Results 1 to 2 of 2

Thread: How to display cat and posts only on Archives page

  1. #1
    Join Date
    Apr 2009
    Posts
    14

    Default How to display cat and posts only on Archives page

    Hi, i would like to know how to only display on my archives page "categories" and a complete list of "single posts" in that order. I wish to exclude "by month" completely, or any reference to time. I've already commented-out dates.

    Thanx a bunch!

  2. #2
    Join Date
    Feb 2009
    Posts
    605

    Default

    Open archives.php and remove this:

    PHP Code:
    <h3 class="top">by month:</h3>
    <ul>
    <?php wp_get_archives('type=monthly'); ?>
    </ul>
    As for displaying all posts, use get_posts:

    PHP Code:
    <h3 class="top">all posts:</h3>
    <ul>
    <?php
    $postslist 
    get_posts('numberposts=-1');
    foreach (
    $postslist as $post) : 
    setup_postdata($post);
    ?>
        <li><?php the_title(); ?></li>
    </ul>
    <?php endforeach; ?>
    For more details: http://codex.wordpress.org/Template_Tags/get_posts



    Quote Originally Posted by ceejski View Post
    Hi, i would like to know how to only display on my archives page "categories" and a complete list of "single posts" in that order. I wish to exclude "by month" completely, or any reference to time. I've already commented-out dates.

    Thanx a bunch!

+ Reply to Thread

Similar Threads

  1. Replies: 6
    Last Post: 02-12-2010, 11:46 AM
  2. Replies: 0
    Last Post: 01-29-2010, 07:23 PM
  3. Greater separation of posts/columns on index page?
    By scubydu in forum Posts, Pages, Comments
    Replies: 8
    Last Post: 09-30-2009, 06:33 PM
  4. Replies: 2
    Last Post: 09-19-2009, 01:07 PM
  5. Page archives question
    By travelrants in forum SEO
    Replies: 7
    Last Post: 06-05-2008, 05:17 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts