<?php 
/*
 * @package WordPreciousss
 * @subpackage Precious_Parent_Theme
*/
	get_header('mine');
		
	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 id="pagetitle"><?php _e('Archives for','precious'); ?> <?php echo single_cat_title(); ?> </h2>
		<p><?php echo category_description(); ?></p>

	  <?php /* If this is a tag archive WP Tags */ } elseif(is_tag()) { ?>
		<h2 id="pagetitle"><?php _e('Posts tagged','precious'); ?> <?php single_tag_title(); ?></h2>
		
 	  <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
		<h2 id="pagetitle"><?php _e('Archives for','precious'); ?> <?php the_time(get_option('date_format')); ?></h2>
		
	 <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
		<h2 id="pagetitle"><?php _e('Archives for','precious'); ?> <?php single_month_title(' ') ?></h2>

		<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
		<h2 id="pagetitle"><?php _e('Archives for','precious'); ?> <?php the_time(__('Y','precious')); ?></h2>
		

	<?php /* If this is an author archive */ } elseif (is_author()) { ?>
		<?php 
			if(isset($_GET['author_name'])) :
				$curauth = get_userdatabylogin($author_name); 
			else :
				$curauth = get_userdata(intval($author));
			endif; ?>
		<h2 id="pagetitle"><?php _e('Posts by','precious'); ?> <?php echo $curauth->display_name; ?></h2>

		<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
		<h2 id="pagetitle"><?php _e('Archives','precious'); ?></h2>

		<?php } ?>


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

	
		<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
			<a href="<?php the_permalink() ?>" rel="bookmark"><h2 class="posttitle"><?php the_title(); ?></h2></a>

			<div class="postcontent">
				<?php edit_post_link(__('Edit','precious'),'<p class="editlink">','</p>'); ?>

				<?php the_excerpt() ?>
			</div>
	
	
			<p class="postmeta">
				<a href="<?php the_permalink() ?>"  title="<?php the_title(); ?>">
				<?php _e('Read more..','precious'); ?> &raquo; </a>
			</p>

		</div>

<?php  endwhile; 
		} else {
			precious_404_message();

			get_search_form();
		}
	get_footer('mine');
?>
