WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Archive and category pages (4 posts)

  1. Broomy
    Member
    Posted 7 years ago #

    My archive and category pages seem to show exactly the same as my index page does. Can anyone suggest where i'd need to fix this. Would it be in the index.php? I've included my index just incase it sheds any light on the problem.

    Thanks for any help.

    <?php get_header(); ?>

    <?php query_posts('showposts=8'); ?>
    <div id="content" class="narrowcolumn">

    <div>

    <fieldset style="width:95%; " class="alt">
    <legend class="comments">Stop!</legend>
    <div class="announcement">

    </div>
    </fieldset>

    </div>

    <?php if (is_category()) { ?>
    <h3>You are currently browsing the archives for the <?php single_cat_title(''); ?> category.</h3>

    <?php } elseif ( is_day() || is_month() || is_year() ) { ?>
    <h3>You are currently browsing the archives.</h3>

    <?php } ?>

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

    <div class="post" id="post-<?php the_ID(); ?>">
    <h1>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></h1>
    <p class="postmetadata">by <?php the_author() ?>, on <?php the_time('F jS, Y') ?> | <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
    <div class="entry">
    <?php the_excerpt('Read the rest of this entry »'); ?>
    </div>
    <p class="postmetadata"><?php edit_post_link('Edit', '', ' | '); ?>Tags: <?php the_category(', ') ?></p>
    </div>

    <?php endwhile; ?>

    <?php else : ?>

    <h2 align="center">
    nothing found</h2>

    <?php endif; ?>
    </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

  2. whooami
    Member
    Posted 7 years ago #

    My archive and category pages seem to show exactly the same as my index page does.

    Thats the normal behaviour. You didnt indicate that you had previously changed this behaviour, so Ill point you to :

    http://codex.wordpress.org/Theme_Development#Theme_Template_Files_List

    theres another template hierarchy page there somewhere but I cant find it presently.

  3. Broomy
    Member
    Posted 7 years ago #

    Thanks for the link, it's now sorted :-).

  4. whooami
    Member
    Posted 7 years ago #

    you're welcome, glad that helped :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags