View difference between Paste ID: hnLsVJb7 and vdM0EZf1
SHOW: | | - or go back to the newest paste.
1-
<?php
1+
<?php /* Template Name: Homepage Template With Cat 3 */ ?>
2-
/*
2+
3-
Template Name: Archive Template
3+
4-
*/
4+
5-
?>
5+
<div class="content">
6
			
7
		<div class="posts">
8
		
9-
<div class="content">						
9+
			<div class="page-title section light-padding">
10
			
11-
	<div <?php post_class('post single'); ?>>
11+
				<div class="section-inner">
12
	
13-
		<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
13+
					<h4><?php if ( is_day() ) : ?>
14
						<?php printf( __( 'Date: %s', 'radcliffe' ), '' . get_the_date() . '' ); ?>
15-
			<div class="post-header section">
15+
					<?php elseif ( is_month() ) : ?>
16
						<?php printf( __( 'Month: %s', 'radcliffe' ), '' . get_the_date( _x( 'F Y', 'F = Month, Y = Year', 'radcliffe' ) ) ); ?>
17-
				<div class="post-header-inner section-inner">
17+
					<?php elseif ( is_year() ) : ?>
18-
																									
18+
						<?php printf( __( 'Year: %s', 'radcliffe' ), '' . get_the_date( _x( 'Y', 'Y = Year', 'radcliffe' ) ) ); ?>
19-
					<h2 class="post-title"><?php the_title(); ?></h2>
19+
					<?php elseif ( is_category() ) : ?>
20
						<?php printf( __( 'Category: %s', 'radcliffe' ), '' . single_cat_title( '', false ) . '' ); ?>
21-
				</div> <!-- /post-header-inner section-inner -->
21+
					<?php elseif ( is_tag() ) : ?>
22-
														
22+
						<?php printf( __( 'Tag: %s', 'radcliffe' ), '' . single_tag_title( '', false ) . '' ); ?>
23-
			</div> <!-- /post-header section -->
23+
					<?php elseif ( is_author() ) : ?>
24-
		   				        			        		                
24+
						<?php $curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author)); ?>
25-
			<div class="post-content section-inner thin">
25+
						<?php printf( __( 'Author: %s', 'radcliffe' ), $curauth->display_name ); ?>
26-
										                                        
26+
					<?php else : ?>
27-
				<?php the_content(); ?>
27+
						<?php _e( 'Archive', 'radcliffe' ); ?>
28
					<?php endif; ?>
29
					
30-
									
30+
					<?php
31-
			</div>
31+
					$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
32-
									
32+
					
33-
			<div class="archive-container section-inner thin">
33+
					if ( "1" < $wp_query->max_num_pages ) : ?>
34-
									            
34+
					
35-
	            <ul>
35+
						<span><?php printf( __('(page %s of %s)', 'radcliffe'), $paged, $wp_query->max_num_pages ); ?></span>
36
					
37
					<?php endif; ?></h4>
38-
		            <?php $posts_archive = get_posts('numberposts=-1');
38+
					
39-
		            foreach($posts_archive as $post) : ?>
39+
					<?php
40-
		                <li>
40+
						$tag_description = tag_description();
41-
		                	<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
41+
						if ( ! empty( $tag_description ) )
42-
		                		<?php the_title();?> 
42+
							echo apply_filters( 'tag_archive_meta', '<div class="tag-archive-meta">' . $tag_description . '</div>' );
43-
		                		<span><?php the_time(get_option('date_format')); ?></span>
43+
					?>
44-
		                	</a>
44+
45-
		                </li>
45+
				</div> <!-- /section-inner -->
46-
		            <?php endforeach; ?>
46+
47-
	            </ul>
47+
			</div> <!-- /page-title -->
48-
	            
48+
			
49-
	            <?php wp_reset_query(); ?>
49+
			<div class="clear"></div>
50-
        
50+
51-
            </div> <!-- /archive-container -->
51+
			<?php if ( have_posts() ) : ?>
52-
		            							
52+
53-
			<?php comments_template( '', true ); ?>
53+
				<?php rewind_posts(); ?>
54
			
55-
		<?php endwhile; else: ?>
55+
				<?php while ( have_posts() ) : the_post(); ?>
56
				
57-
			<p><?php _e("We couldn't find any posts that matched your query. Please try again.", "radcliffe"); ?></p>
57+
					<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
58
			
59
						<?php get_template_part( 'content', get_post_format() ); ?>
60
												
61-
	</div> <!-- /post -->
61+
					</div> <!-- /post -->
62
					
63-
	<div class="clear"></div>
63+
				<?php endwhile; ?>
64
							
65
		</div> <!-- /posts -->
66
					
67-
<?php
67+
		<?php if ( $wp_query->max_num_pages > 1 ) : ?>
68
			
69-
								
69+
			<div class="archive-nav">
70
			
71
				<?php echo get_next_posts_link( '&laquo; ' . __('Older posts', 'radcliffe')); ?>
72
						
73
				<?php echo get_previous_posts_link( __('Newer posts', 'radcliffe') . ' &raquo;'); ?>
74
				
75
				<div class="clear"></div>
76
				
77
			</div> <!-- /post-nav archive-nav -->
78
							
79
		<?php endif; ?>
80
				
81
	<?php endif; ?>
82
83
</div> <!-- /content -->
84
85
<?php get_footer(); ?>