Support » Installing WordPress » Showing only 1 post?

  • I want to change the way my archive pages act. I want to change it so that when you access the archive page it automatically shows you an assigned post.

    I managed to make the archive page show the posts like they appear in single.php (pretty much because I copied and pasted) but it currently shows all of the posts.

    Is there something I can do to show just one post/and assign it to be a certain post, not like the most recent?

Viewing 1 replies (of 1 total)
  • by the way, here is the code im using.

    <?php get_header(); ?>

    <div id=”content” class=”narrowcolumn”>

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <div class=”navigation”>
    <div class=”alignleft”></div>
    <div class=”alignright”></div>

    <div class=”post” id=”post-<?php the_ID(); ?>”>
    <h2>” rel=”bookmark” title=”Permanent Link: <?php the_title_attribute(); ?>”><?php the_title(); ?></h2>

    <div class=”entry”>
    <small><class=”postmetadata”><?php the_tags(‘Tags: ‘, ‘, ‘, ‘
    ‘); ?> Filed under: <?php the_category(‘, ‘) ?></small>
    <?php the_content(‘<p class=”serif”>Read the rest of this entry »</p>’); ?>

    <?php wp_link_pages(array(‘before’ => ‘<p>Pages: ‘, ‘after’ => ‘</p>’, ‘next_or_number’ => ‘number’)); ?>
    <?php the_tags( ‘<p>Tags: ‘, ‘, ‘, ‘</p>’); ?>


    <?php endwhile; else: ?>

    <p>Sorry, no posts matched your criteria.</p>

    <?php endif; ?>


    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Showing only 1 post?’ is closed to new replies.