Problem with archive in Wordpress

3 replies
  • WEB DESIGN
  • |
Hello Warriors,

In my site on Wordpress, I'm having issues with the archive file.

When I try to view a post on my site it just says "Archive for the (name of the post) Category"

Here is my site

Here is the archive.php code

<?php get_header(); ?>

<div class="auto_post">
<div class="alpha">


<div class="alpha_right">
<div class="kotak_post">

<?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">Archive for the ‘<?php single_cat_title(); ?>’ Category</h2>
<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
<h2 class="pagetitle">Posts Tagged ‘<?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 an author archive */ } elseif (is_author()) { ?>
<h2 class="pagetitle">Author Archive</h2>
<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<h2 class="pagetitle">Blog Archives</h2>
<?php } ?>


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

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

<div class="post_box" id="post-<?php the_ID(); ?>">
<h2><?php the_title(); ?></h2>
<span class="sing_m"><span class="tgl"><?php the_time('F jS, Y') ?></span> by <?php printf(__('<span class="by">By</span> %s', 'carrington'), '<a class="url fn" href="'.get_author_link(false, get_the_author_ID(), $authordata->user_nicename).'" title="View all posts by ' . attribute_escape($authordata->display_name) . '">'.get_the_author().'</a>') ?> # <?php the_category(', ') ?> </span>

<div class="entry">
<?php the_excerpt('Read the rest of this entry &raquo;'); ?>
</div>

<p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ''); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>

</p>


</div>

<?php endwhile; ?>

<?php comments_template(); ?>

<?php else : ?>

<?php endif; ?>
</div>



</div><!--alpha_right -->


</div><!--alpha -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

Any help would be greatly appreciated!
#archive #problem #wordpress

Trending Topics