File: /home/slyfwmm/incastiglionfiorentino/wp-content/themes/amplify/archive.php
<?php
/**
* The template for displaying Archive pages.
*
* Used to display archive-type pages if nothing more specific matches a query.
* For example, puts together date-based pages if no date.php file exists.
*
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
*/
get_header(); ?>
<div id="main_container">
<!-- IE7 float fix --><!--[if lt IE 7]><span class="iefix">.</span><![endif]-->
<div class="main">
<div class="entries_full">
<div class="entry_full">
<div class="box_twothirds mt30 pr60">
<!-- ARCHIVE POSTS BEGIN -->
<?php
/* Queue the first post, that way we know
* what date we're dealing with (if that is the case).
*
* We reset this later so we can run the loop
* properly with a call to rewind_posts().
*/
if (have_posts()) :
?>
<div class="archive_header"><span class="highlight_gray">
<?php if ( is_day() ) : ?>
<?php printf( __( 'Daily Archives: %s', 'amplify' ), get_the_date() ); ?>
<?php elseif ( is_month() ) : ?>
<?php printf( __( 'Monthly Archives: %s', 'amplify' ), get_the_date('F Y') ); ?>
<?php elseif ( is_year() ) : ?>
<?php printf( __( 'Yearly Archives: %s', 'amplify' ), get_the_date('Y') ); ?>
<?php else : ?>
<?php _e( 'Blog Archives', 'amplify' ); ?>
<?php endif; ?>
</span></div>
<?php
/* Since we called the_post() above, we need to
* rewind the loop back to the beginning that way
* we can run the loop properly, in full.
*/
rewind_posts();
/* Run the loop for the archives page to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-archives.php and that will be used instead.
*/
?>
<?php $count = 0; ?>
<?php while ( have_posts() ) : the_post(); ?>
<!-- displays the blog posts -->
<?php $count++; if($count > 3) { $count = 1; } ?>
<h3 class="<?php if($count > 1) echo "mt25 "; ?>mb12"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
<?php if(get_field('large_image_value') != NULL || get_field('fullsize_value') != NULL)
{ ?>
<div class="mag_blog"><!-- magnifying glass div -->
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><img src="<?php echo get_template_directory_uri(); ?>/scripts/timthumb.php?src=<?php if(get_field('large_image_value') != NULL) {echo get_field('large_image_value);} else {echo get_field('fullsize_value');} ?>&h=213&w=600&zc=1" alt="<?php the_title(); ?>" /></a>
</div><!-- end magnifying glass div -->
<?php } ?>
<p class="meta"><span class="postdate"><?php the_time('F jS, Y') ?></span><span class="tags"><?php the_category(', '); ?></span><span class="comments"><a href="single.php#comments" title="comments"><?php comments_number('0 comments','1 comment','% comments'); ?></a></span></p>
<?php global $more; $more = false; ?><?php the_content('<span>Continue Reading</span>'); ?><?php $more = true; ?>
<div class="bar mt25 mb30"></div>
<!-- ARCHIVE POSTS END -->
<?php endwhile;
if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
else { ?>
<?php /* Display navigation to next/previous pages when applicable */ ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<?php next_posts_link( __( '← Older posts', 'amplify' ) ); ?>
<?php previous_posts_link( __( 'Newer posts →', 'amplify' ) ); ?>
<?php endif; ?>
<?php } ?>
<?php else : ?>
<h1><?php _e( $str1, 'amplify' ); ?></h1>
<p><?php _e( $str2, 'amplify' ); ?></p>
<?php endif; ?>
</div>
<!-- Begin Sidebar -->
<?php include('sidebar.php'); ?>
<!-- end sidebar -->
<div class="clear"></div>
</div><!-- end div.entry -->
</div><!-- end div.entries -->
<div class="clear"></div>
</div><!-- end div#main -->
<div class="clear"></div>
</div><!-- end div#main_container-->
<?php get_footer(); ?>