WordPress.org

Ready to get started?Download WordPress

Forums

Editing Archive Page (2 posts)

  1. Darkshrimp
    Member
    Posted 8 years ago #

    im'trying to edit this archive page, right now it looks like this

    http://img221.imageshack.us/img221/3558/untitled16wu.jpg

    in the arrow pointed area, i want it to actually show the blog post, not just the title..
    the code is this at the moment

    <div id="content" class="widecolumn">

    <?php if (have_posts()) : ?>

    <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?><br />
    <?php /* If this is a category archive */ if (is_category()) { ?><br />
    <h2 class="title"><?php echo single_cat_title(); ?> Blog</h2>

    <?php /* If this is a daily archive */ } elseif (is_day()) { ?><br />
    <h2 class="title">Archive for <?php the_time('F jS, Y'); ?></h2>

    <?php /* If this is a monthly archive */ } elseif (is_month()) { ?><br />
    <h2 class="title">Archive for <?php the_time('F, Y'); ?></h2>

    <?php /* If this is a yearly archive */ } elseif (is_year()) { ?><br />
    <h2 class="title">Archive for <?php the_time('Y'); ?></h2>

    <?php /* If this is a search */ } elseif (is_search()) { ?><br />
    <h2 class="title">Search Results</h2>

    <?php /* If this is an author archive */ } elseif (is_author()) { ?><br />
    <h2 class="title">Author Archive</h2>

    <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) &&amp; !empty($_GET['paged'])) { ?><br />
    <h2 class="title">Blog Archives</h2>

    <?php } ?>

    <?php while (have_posts()) : the_post(); ?><br />
    <div class="post"><br />
    <h2 id="post-<?php the_ID(); ?>"><a>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3><br />
    &bull; <?php the_time('l, F jS, Y') ?><br />
    <?php the_post()><br />
    <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?><br />
    </div>

    <?php endwhile; ?>

    <div class="navigation"><br />
    <div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div><br />
    <div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div><br />
    </div>

    <?php else : ?>

    <h2 class="center">Not Found</h2><br />
    <?php include (TEMPLATEPATH . '/searchform.php'); ?>

    <?php endif; ?>

    </div>
    how would i edit that?thanks :D

  2. moshu
    Member
    Posted 8 years ago #

    Where did you get this:
    <?php the_post()>? I don't remember such a template tag...

    Maybe you wanted to use the_content.

Topic Closed

This topic has been closed to new replies.

About this Topic