osp-website
clone your own copy | download snapshot

Snapshots | iceberg

Inside this repository

archive.php~
text/x-php

Download raw (2.1 KB)

<?php get_header(); ?>
		
<div id="content_box">

	<div id="left_side">
	
		<?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()) { ?>				
			<h1><span class="label">Category:</span> <?php echo single_cat_title(); ?></h2>
			<p><?php category_description(); ?></p>
			
			<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
			<h1><?php the_time('F Y'); ?></h1>

			<?php /* If this is an author archive */ } elseif (is_author()) { ?>
			<?php 
			if(isset($_GET['author_name'])) :
			$curauth = get_userdatabylogin($author_name); // NOTE: 2.0 bug requires get_userdatabylogin(get_the_author_login());
			else : 
			$curauth = get_userdata(intval($author));
			endif ; ?>
			<h1><span class="label">Author:</span> <?php wp_title(''); ?></h1>

			<?php /* If this is a tag archive */ } elseif (is_tag()) { ?>
			<h1><span class="label">Tag:</span> <?php single_tag_title(); ?></h1>
			<p><?php echo $curauth->description; ?></p>
		
			<?php } ?>

		<div class="listing">
			<?php while (have_posts()) : the_post(); ?>
			<div class="post">
				<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>
				<p class="meta"><?php the_time('F jS, Y') ?> &middot; <?php the_tags('Tags: ', ' &middot; ', ''); ?> &middot; <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></p>
				<div class="entry">
					<?php the_excerpt() ?>
				</div><!--entry-->
			</div><!--post-->
			
		<?php endwhile; ?>
			
		<?php else : ?>
	
			<h1>Nothing found</h1>
			<div class="entry">
				<p><?php include (TEMPLATEPATH . '/searchform.php'); ?></p>
			</div>
		<?php endif; ?>
	</div><!--listing-->

	</div><!--left_side-->

		<div class="sidebar">
			<?php include (TEMPLATEPATH . '/sidebar.php'); ?>
		</div>
		<div class="r_sidebar">
			<?php include (TEMPLATEPATH . '/r_sidebar.php'); ?>
		</div>
</div><!--content_box-->

<?php get_footer(); ?>