Просмотр файла WP-wap/archive.php

Размер файла: 2.47Kb
<?php get_header(); ?>

<div id="mainwrapper" class="clearfix">
	<div id="maincontent">
		<?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 echo single_cat_title(); ?>'</h2>
			<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
			<h2 class="pagetitle">Архив <?php the_time('F jS, Y'); ?></h2>
			<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
			<h2 class="pagetitle">Архив <?php the_time('F, Y'); ?></h2>
			<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
			<h2 class="pagetitle">Архив <?php the_time('Y'); ?></h2>
			<?php /* If this is a search */ } elseif (is_search()) { ?>
			<h2 class="pagetitle">Результат поиска</h2>
			<?php /* If this is an author archive */ } elseif (is_author()) { ?>
			<h2 class="pagetitle">Архив автора</h2>
			<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
			<h2 class="pagetitle">Архив блога</h2>
			<?php } ?>
			<?php while (have_posts()) : the_post(); ?>
			<div class="post posthome">
            	<div>
                    <h2 id="post-<?php the_ID(); ?>" class="thetitle"><?php the_title(); ?></h2>
                    <div class="postinfo">
						<?php the_time('F jS, Y') ?>, <?php the_author() ?><br />
						<strong>Категория:</strong> <?php the_category(' | ') ?>
					</div>                
					<div class="entry">
						<?php the_excerpt(); ?>
					</div>
					<div class="postinfo">	
                    	<a href="<?php the_permalink() ?>">подробней...</a>
                    	<?php comments_popup_link('', '<br />Комментарии(1)', '<br />Комментарии(%)'); ?><br />
					</div>
                </div>
			</div>
			<?php endwhile; ?>
				
				<?php 
				$max_num_pages = $wp_query->max_num_pages;
				if($max_num_pages > 1) { 
				?>
			<div>
                <div><?php posts_nav_link('','','&laquo; назад') ?> &nbsp; <?php posts_nav_link('','вперёд &raquo;','') ?></div>
            </div>
				<?php }else{ } ?>
			
			<?php else : ?>
				<div class="post">
                    <div class="postnohit">
                        <h2 class="pagetitle">Не найден</h2>
                    </div>
                </div>
		<?php endif; ?>
	</div>
</div>

<?php get_footer(); ?>