• Resolved stolensunmedia

    (@stolensunmedia)


    So I’m using a free theme I had downloaded, yet there are a couple tweaks I’d like to make. This first and most important change I’d like to make is to my archive pages. As it stands if you click on the archive for any given category each and every post is shown in full. What I’d rather have it’s just a nice neat, clean list of Posts with the titles being clickable links rather than the entire posts being shown.

    Any help would be MUCH appreciated. Thanks!

    Here’s the code for the archive.php:

    <?php get_header(); ?>

    <!–content–>

    <div id=”content”>

    <!–left-col–>

    <div id=”left-col”>

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

    <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>

    <?php /* If this is a category archive */ if (is_category()) { ?>

    <h2 class=”pagetitle”><?php single_cat_title(); ?></h2>

    <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>

    <h2 class=”pagetitle”><?php single_tag_title(); ?></h2>

    <?php /* If this is a daily archive */ } elseif (is_day()) { ?>

    <h2 class=”pagetitle”>Archive for <?php the_time(‘F jS, Y’); ?></h2>

    <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>

    <h2 class=”pagetitle”>Archive for <?php the_time(‘F, Y’); ?></h2>

    <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>

    <h2 class=”pagetitle”>Archive for <?php the_time(‘Y’); ?></h2>

    <?php /* If this is a paged archive */ } elseif (isset($_GET[‘paged’]) && !empty($_GET[‘paged’])) { ?>

    <h2 class=”pagetitle”>Blog Archives</h2>

    <?php } ?>

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

    <div class=”post” id=”post-<?php the_ID(); ?>”>
    <h2>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></h2><p class=”postinfo”>POSTED by:<span class=”post-author”> <?php the_author() ?></span> on <?php the_time(‘m/d/Y’) ?> </p><span class=”post-comments”><?php comments_popup_link(‘(0)’, ‘(1)’, ‘(%)’); ?></span>

    <div style=”clear:both;”></div>

    <div class=”entry”>

    <?php the_content(__(‘<span class=”more”>READ MORE</span>’));?>

    </div>

    </div><!–post-end–>

    <?php endwhile; ?>

    <div class=”navigation”>
    <?php posts_nav_link(”,”,'<span class=”previous”>Previous</span>’) ?>
    <?php posts_nav_link(”,'<span class=”next”>Next</span>’,”) ?>
    </div>

    <?php else : ?>

    <h2 class=”center”>Not Found</h2>

    <?php endif; ?>

    </div>

    <?php get_sidebar(); ?>

    </div><!–content-end–>

    </div><!–wrapper-end–>

    <?php get_footer(); ?>

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Help with Archives template’ is closed to new replies.