PHP 我的Wordpress档案页面

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PHP 我的Wordpress档案页面相关的知识,希望对你有一定的参考价值。

<?php get_header(); ?>
<div class="column span-5 first">
	<div class="archive-info">
		<p>You are browsing the <?php bloginfo('name'); ?> archives for 
			<?php if (is_category()) { ?>the category <em>'<?php echo single_cat_title(); ?>'</em>
			<?php } elseif (is_month()) { ?>the month <em>'<?php the_time('F Y'); ?>'</em>
			<?php } elseif (is_year()) { ?>the year <em>'<?php the_time('Y'); ?>'</em>
			<?php } elseif (is_tag()) { ?>the tag <em>'<?php  single_tag_title(); ?>'</em>
			<?php } ?>.  
			
			Posts from both the <a href="/category/notebook/">Notebook</a> and <a href="/category/photography/">Photoblog</a> are divided to help you find what you're looking for.  
		</p>
	</div>
		<div class="navigation arch">
			<div class="clear"></div>
			<div class="alignleft">
				<?php next_posts_link('« Previous') ?>
			</div>
			<div class="alignright">
				<?php previous_posts_link('Next »') ?>
			</div>
		</div>
		<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Archives') ) : endif; ?>
</div>
<?php if ( !is_category('6') ) : ?>
<div class="column <?php if ( !is_category('8') ) : ?>span-8<?php else : ?>span-19 last<?php endif; ?>">
	<div class="content">
	<?php if (have_posts()) : ?>
					<h2 class="category_page">Photos</h2>
					<?php $i = 1; ?>
					<?php while (have_posts()) : the_post(); ?>
						<?php if ( in_category('8') ): ?>
							<div class="archive-post <?php if ( !is_category('8') ) : ?>a<?php echo $i; endif?>" id="post-<?php the_ID(); ?>">
							<?php if ($post->image): ?>
								<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
									<img src="<?php echo $post->image->getThumbnailHref(array('w=73','h=73', 'zc=1','fltr[]=usm|30|0.5|3')) ?>" class="full" alt="<?php the_title(); ?>" />
								</a>
							<?php endif; ?>	
						</div>
					<?php $i++; ?>
						<?php endif; ?>
				<?php endwhile; ?>
			<?php else : ?>
				<h2>Welp, we couldn't find that...try again?</h2>
				<div class="entry">
					<?php include (TEMPLATEPATH . '/searchform.php'); ?>
				</div>
			<?php endif; ?>
		</div>
	</div>
<?php endif; ?>
<?php if ( !is_category('8') ) : ?>
	<div class="column <?php if ( !is_category('6') ) : ?>span-11<?php else : ?>span-19<?php endif; ?> last arch">
		<h2 class="category_page">Entries</h2>
<?php while (have_posts()) : the_post(); ?>
						<?php if ( in_category('6') ): ?>
		<div class="post" id="post-<?php the_ID(); ?>">
				<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>
						<p class="small"><?php the_time('F jS, Y') ?>
							 |  
							Published in  <?php the_category(', '); ?></p>

			<p><?php the_excerpt(); ?></p>
		</div>
	<?php endif; ?>	
	<?php endwhile; ?>
	</div>
<?php endif; ?>
</div>
<hr class="space" />
<?php get_sidebar();  get_footer(); ?>

以上是关于PHP 我的Wordpress档案页面的主要内容,如果未能解决你的问题,请参考以下文章

我需要从我的 Wordpress 博客中删除档案。?.?

Wordpress 单页、类别和档案菜单当前项

php Wordpress动态档案标题

php Wordpress档案标题

PHP Wordpress的基于日期的类别档案

PHP WordPress档案基础