File: /home/mmickelson/theflexguys.com/baronconstruct/wp-content/themes/rt_affinity_wp/archive.php
<?php get_header(); ?>
<?php $option = get_option('affinity-options'); ?>
<!-- Begin Main Content Column -->
<div id="vertical-sort">
<!-- Begin Section Row 3 -->
<div id="section-row3" class="section-row">
<div id="section-row3-inner">
<div id="main-body-surround" class="spacer">
<div id="main-body" class="spacing">
<div class="module-<?php echo $option['affinity_mainconstyle']; ?>">
<div class="body-surround-top">
<div class="body-surround-top2">
<div class="body-surround-top3"></div>
</div>
</div>
<!-- Begin Main Body Column -->
<div class="body-surround">
<div class="body-surround2">
<div class="body-surround3">
<div id="main-content">
<div id="maincol<?php if($option['affinity_leftsidebar_sub'] != 'true') { echo '2'; } ?>">
<div class="maincol-padding">
<?php if($option['affinity_breadcrumbs'] == 'true') { ?>
<!-- Begin Breadcrumbs -->
<div id="breadcrumbs">
<div id="breadcrumbs2">
<div id="breadcrumbs3">
<a href="<?php bloginfo('url'); ?>/" id="breadcrumbs-home"></a>
</div>
</div>
</div>
<!-- End Breadcrumbs -->
<?php } ?>
<div class="bodycontent">
<div class="mainbody-surround">
<div id="maincontent-block">
<div class="">
<div id="page" class="full-article archive-page">
<div class="">
<div class="article-rel-wrapper"></div>
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
if (is_category()) { $archive_postcount = $option['affinity_category_postcount']; $post_meta_enabled = $option['affinity_category_postmeta']; $title_links = $option['affinity_category_titlelink']; $post_meta_author = $option['affinity_category_postmeta_author']; $post_meta_date = $option['affinity_category_postmeta_date']; $post_meta_comments = $option['affinity_category_postmeta_comments']; $content_display = $option['affinity_category_contentdis']; }
if (is_day() || is_month() || is_year() || is_author()) { $archive_postcount = $option['affinity_archive_postcount']; $post_meta_enabled = $option['affinity_archive_postmeta']; $title_links = $option['affinity_archive_titlelink']; $post_meta_author = $option['affinity_archive_postmeta_author']; $post_meta_date = $option['affinity_archive_postmeta_date']; $post_meta_comments = $option['affinity_archive_postmeta_comments']; $content_display = $option['affinity_archive_contentdis']; }
if (is_tag()) { $archive_postcount = $option['affinity_tag_postcount']; $post_meta_enabled = $option['affinity_tag_postmeta']; $title_links = $option['affinity_tag_titlelink']; $post_meta_author = $option['affinity_tag_postmeta_author']; $post_meta_date = $option['affinity_tag_postmeta_date']; $post_meta_comments = $option['affinity_tag_postmeta_comments']; $content_display = $option['affinity_tag_contentdis']; }
?>
<?php query_posts($query_string.'&posts_per_page='.$archive_postcount.'&paged='.$paged); ?>
<?php if (have_posts()) : ?>
<div class="article-rel-wrapper">
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>
<h2 class="contentheading"><?php _re('Category:'); ?> <?php single_cat_title(); ?></h2>
<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
<h2 class="contentheading"><?php _re('Posts Tagged'); ?> ‘<?php single_tag_title(); ?>’</h2>
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<h2 class="contentheading"><?php _re('Archive for'); ?> <?php the_time('F jS, Y'); ?></h2>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h2 class="contentheading"><?php _re('Archive for'); ?> <?php the_time('F, Y'); ?></h2>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<h2 class="contentheading"><?php _re('Archive for'); ?> <?php the_time('Y'); ?></h2>
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
<h2 class="contentheading"><?php _re('Author Archive'); ?></h2>
<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<h2 class="contentheading"><?php _re('Blog Archives'); ?></h2>
<?php } ?>
</div>
<?php while (have_posts()) : the_post(); ?>
<!-- Begin Post -->
<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<div class="article-rel-wrapper">
<?php if($title_links == 'true') { ?>
<h2 class="componentheading"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php } else { ?>
<h2 class="componentheading"><?php the_title(); ?></h2>
<?php } ?>
</div>
<?php if ($post_meta_enabled == 'true') { ?>
<div class="article-info-surround">
<div class="article-info-surround2">
<p class="articleinfo">
<?php if ($post_meta_author == 'true') { ?>
<span class="createdby"><?php _re('Posted by'); ?> <?php the_author(); ?> <?php _re('in'); ?> <?php the_category(', ') ?></span>
<?php } ?>
<?php if ($post_meta_date == 'true') { ?>
<span class="createdate"><?php the_time('l, j F Y H:i'); ?></span>
<?php } ?>
<?php if ($post_meta_comments == 'true') { ?>
<a href="<?php the_permalink(); ?>#comments"><span class="commentsnum"><?php comments_number(_r('No Comments'), _r('1 Comment'), _r('% Comments')); ?></span></a>
<?php } ?>
</p>
</div>
</div>
<?php } ?>
<?php if($content_display == 'content') { ?>
<?php the_content(false); ?>
<?php } else { ?>
<?php the_excerpt(); ?>
<?php } ?>
<div class="clr"></div>
<?php if(preg_match('/<!--more(.*?)?-->/', $post->post_content)) { ?>
<div class="readon-wrap1">
<div class="readon1-l"></div>
<a href="<?php the_permalink(); ?>" class="readon-main"><span class="readon1-m"><span class="readon1-r"><?php _re('Learn More'); ?></span></span></a>
</div>
<div class="clr"></div>
<?php } ?>
</div><br />
<!-- End Post -->
<?php endwhile;?>
<?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?>
<div class="pagination nav">
<div class="alignleft">
<div class="tab">
<div class="tab2">
<?php next_posts_link('« '._r('Older Entries')); ?>
</div>
</div>
</div>
<div class="alignright">
<div class="tab">
<div class="tab2">
<?php previous_posts_link(_r('Newer Entries').' »') ?>
</div>
</div>
</div>
<div class="clr"></div>
</div>
<?php } ?>
<?php else : ?>
<span class="attention"><?php _re("Sorry, but there aren't any posts matching your query."); ?></span>
<?php endif; ?>
<?php wp_reset_query(); ?>
</div>
</div>
<span class="leading_separator"> </span>
</div>
</div>
<div class="mainbody-tl"></div>
<div class="mainbody-tr"></div>
<div class="mainbody-bl"></div>
<div class="mainbody-br"></div>
</div>
</div>
</div>
</div>
</div>
<!-- Begin Left Column -->
<?php if($option['affinity_leftsidebar_sub'] == 'true') { ?>
<?php get_sidebar('left-sub'); ?>
<?php } ?>
<!-- End Left Column -->
</div>
</div>
</div>
<!-- End Main Body Column -->
<div class="body-surround-bottom">
<div class="body-surround-bottom2">
<div class="body-surround-bottom3"></div>
</div>
</div>
</div>
</div>
<!-- Begin Right Column -->
<?php if($option['affinity_rightsidebar_sub'] == 'true') { ?>
<?php get_sidebar('right-sub'); ?>
<?php } ?>
<!-- End Right Column -->
</div>
</div>
</div>
<!-- End Section Row 3 -->
<!-- Begin Section Row 4 -->
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('User 4') ) : ?>
<?php endif; ?>
<!-- End Section Row 4 -->
<!-- Begin Section Row 5 -->
<?php if(is_active_sidebar('user_5') || is_active_sidebar('user_6') || is_active_sidebar('user_7')) { ?>
<div id="section-row5" class="section-row">
<div id="bottom-main2">
<div id="mainmodules5" class="spacer">
<?php if(is_active_sidebar('user_5')) { ?>
<!-- Begin User 5 -->
<div class="block first" style="width: <?php echo $option['affinity_userwgetwidth']; ?>px;">
<div class="module-<?php echo $option['affinity_user5style']; ?>">
<div id="row5-block1" class="row">
<div class="body-surround-top">
<div class="body-surround-top2">
<div class="body-surround-top3"></div>
</div>
</div>
<div class="body-surround">
<div class="body-surround2">
<div class="body-surround3">
<!-- Begin Widget -->
<?php dynamic_sidebar('User 5'); ?>
<!-- End Widget -->
</div>
</div>
</div>
<div class="body-surround-bottom">
<div class="body-surround-bottom2">
<div class="body-surround-bottom3"></div>
</div>
</div>
</div>
</div>
</div>
<!-- End User 5 -->
<?php } ?>
<?php if(is_active_sidebar('user_6')) { ?>
<!-- Begin User 6 -->
<div class="block middle" style="width: <?php echo $option['affinity_userwgetwidth']; ?>px;">
<div class="module-<?php echo $option['affinity_user6style']; ?>">
<div id="row5-block2" class="row">
<div class="body-surround-top">
<div class="body-surround-top2">
<div class="body-surround-top3"></div>
</div>
</div>
<div class="body-surround">
<div class="body-surround2">
<div class="body-surround3">
<!-- Begin Widget -->
<?php dynamic_sidebar('User 6'); ?>
<!-- End Widget -->
</div>
</div>
</div>
<div class="body-surround-bottom">
<div class="body-surround-bottom2">
<div class="body-surround-bottom3"></div>
</div>
</div>
</div>
</div>
</div>
<!-- End User 6 -->
<?php } ?>
<?php if(is_active_sidebar('user_7')) { ?>
<!-- Begin User 7 -->
<div class="block last" style="width: <?php echo $option['affinity_userwgetwidth']; ?>px;">
<div class="module-<?php echo $option['affinity_user7style']; ?>">
<div id="row5-block3" class="row">
<div class="body-surround-top">
<div class="body-surround-top2">
<div class="body-surround-top3"></div>
</div>
</div>
<div class="body-surround">
<div class="body-surround2">
<div class="body-surround3">
<!-- Begin Widget -->
<?php dynamic_sidebar('User 7'); ?>
<!-- End Widget -->
</div>
</div>
</div>
<div class="body-surround-bottom">
<div class="body-surround-bottom2">
<div class="body-surround-bottom3"></div>
</div>
</div>
</div>
</div>
</div>
<!-- End User 7 -->
<?php } ?>
</div>
</div>
</div>
<?php } ?>
<!-- End Section Row 5 -->
</div>
<!-- End Main Content Column -->
<?php get_footer(); ?>