1. <?php
  2. /**
  3.  * Used for blog page when set in 'Reading > Posts page'
  4.  *  
  5.  * @package WordPress
  6.  * @subpackage Amplifier
  7.  */
  8.  
  9. get_header(); ?>
  10.        
  11.     <!-- BEGIN CALL TO ACTION -->
  12.     <div class="inner-cta-wrap">
  13.         <div id="call-to-action" class="container_12">
  14.  
  15.             <!-- TOP SENTENCE -->
  16.             <div id="cta-top" class="grid_12">
  17.                 <h3 class="inner-title">
  18.                 <?php if(of_get_option('blog_title_strong') != '' || of_get_option('blog_title_subtitle') != '') { // if the blog titles are not empty ?>
  19.                 <span class="cta-strong-title"><?php echo stripslashes(of_get_option('blog_title_strong')); ?></span><span class="cta-small-title">&nbsp; <?php echo stripslashes(of_get_option('blog_title_subtitle')); ?></span>
  20.                 <?php } else { // if the blog title is empty, display this placeholder title ?>
  21.                 <span class="cta-strong-title">Set this title</span><span class="cta-small-title">// &nbsp; in the theme options panel under 'Pages'!</span>
  22.                 <?php } ?>
  23.                 </h3>
  24.             </div> <!-- end #cta-top .grid_12-->
  25.            
  26.         </div> <!-- end .container_12 #call-to-action -->
  27.     </div><!-- end .cta-wrap -->
  28.    
  29.     <div class="dotted-hr" style="margin-bottom:5px"></div>
  30.    
  31.     <div class="clear"></div>
  32.    
  33.     <!-- Begin Main Body -->
  34.     <div class="container_12" id="body-wrap" role="main">
  35.    
  36.         <div id="breadcrumb-wrap" class="grid_12 breadcrumbs">
  37.             <?php if(function_exists('bcn_display')) {  bcn_display(); } ?>
  38.         </div> <!-- end #breadcrumb-wrap .grid_12 -->
  39.        
  40.         <?php $sidebar_position = of_get_option('sidebar_position'); ?>
  41.  
  42.         <?php if ($sidebar_position == 'left') { ?>
  43.  
  44.             <div id="sidebar" class="grid_4 suffix_1 alpha">
  45.        
  46.             <?php get_sidebar(); ?>
  47.    
  48.             </div> <!-- end #sidebar .grid_4 -->
  49.    
  50.         <?php } ?>
  51.    
  52.         <div id="post-content-wrap" class="<?php if($sidebar_position == 'right') { echo 'grid_7 suffix_1'; } elseif($sidebar_position == 'left') { echo 'grid_7'; } ?> blog-content-wrap">
  53.        
  54.             <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  55.  
  56.             <div class="blog-page-post">
  57.                
  58.             <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">  
  59.                
  60.                 <h3 class="blog-page-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'amplifier'), get_the_title()); ?>"> <?php the_title(); ?></a></h3>
  61.                                    
  62.                 <!-- Post Meta -->
  63.                 <div class="blog-page-meta">
  64.                     <ul>
  65.                         <li><?php the_time( 'F j, Y' ); ?></li>
  66.                         <li><span>&nbsp; &#47; &nbsp;</span><?php comments_popup_link(__('No Comments', 'amplifier'), __('1 Comment', 'amplifier'), __('% Comments', 'amplifier')); ?></li>
  67.                         <li><span>&nbsp; &#47; &nbsp; <?php _e('Written by','amplifier') ?> </span><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author_link(); ?></a></li>                           
  68.                     </ul>
  69.                        
  70.                 <div class="clear"></div>
  71.                        
  72.                 </div> <!-- end .meta -->
  73.                
  74.             <!-- Featured Image -->
  75.             <?php
  76.                 if (has_post_thumbnail()) { /* if the post has a featured image */
  77.                 $blog_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), ''); // Get original image size
  78.                 $thumb = get_post_thumbnail_id();
  79.                 $image = vt_resize( $thumb,'' , 130, 130, true ); // Resize original image
  80.             ?>
  81.                    
  82.             <div class="featured-image image-fade grid_2 alpha">
  83.                    
  84.                 <a class="portfolio lightbox" href="<?php echo $blog_image_url[0]; ?>">
  85.                     <img src="<?php echo $image[url]; ?>" width="<?php echo $image[width]; ?>" height="<?php echo $image[height]; ?>" title="<?php _e('Click to view image','amplifier'); ?>" />
  86.                 </a>
  87.                
  88.                 <div class="blog-more-link grid_2 alpha">
  89.                     <a href="<?php the_permalink(); ?>"><?php _e('read more', 'amplifier'); ?> &rarr;</a>
  90.                 </div>
  91.                
  92.             </div> <!-- end .featured-image .image-fade -->
  93.                    
  94.             <!-- Post Content -->
  95.             <div class="content grid_5">
  96.                    
  97.                 <?php the_excerpt(); ?>
  98.                    
  99.                 <!-- Tags -->
  100.                 <div class="blog-page-meta">
  101.                
  102.                 <?php // Check if post has tags for related posts
  103.                     $tags = wp_get_post_tags($post->ID);
  104.                     if ($tags) {
  105.                 ?>
  106.        
  107.                     <p class="tags">
  108.                         <span class="blog-tags"><?php _e('Tags:', 'amplifier'); ?></span> <?php the_tags('',' ','<br />'); ?>
  109.                     </p>
  110.                    
  111.                 <?php } // end check if post has tags ?>
  112.                    
  113.                 </div> <!-- end .blog-page-meta -->
  114.                    
  115.             </div> <!-- end .content -->
  116.            
  117.             <?php } elseif (!has_post_thumbnail()) { // if there is no thumbnail ?>
  118.            
  119.             <!-- Post Content -->
  120.             <div class="content grid_7">
  121.                    
  122.                 <?php the_excerpt(); ?>
  123.                
  124.                 <div class="blog-more-link grid_2 alpha">
  125.                     <a href="<?php the_permalink(); ?>"><?php _e('read more', 'amplifier'); ?> &rarr;</a>
  126.                 </div>
  127.                    
  128.                 <?php // Check if post has tags for related posts
  129.                     $tags = wp_get_post_tags($post->ID);
  130.                     if ($tags) {
  131.                 ?>
  132.                
  133.                 <!-- Tags -->
  134.                 <div class="blog-page-meta grid_5 omega">
  135.                     <p class="tags">
  136.                         <span class="blog-tags"><?php _e('Tags:', 'amplifier'); ?></span> <?php the_tags('',' ','<br />'); ?>
  137.                     </p>
  138.                 </div> <!-- end .blog-page-meta -->
  139.                
  140.                 <?php } // end check if post has tags ?>
  141.                    
  142.             </div> <!-- end .content -->
  143.            
  144.                    
  145.             <?php } ?>
  146.                
  147.                 <div class="clear"></div>
  148.                    
  149.                 <div class="dotted-hr"></div>
  150.                    
  151.                 </div> <!-- end .blog-page-post -->
  152.                
  153.                 </div> <!-- end post ID <?php the_ID(); ?> -->
  154.                
  155.             <?php endwhile;
  156.             wp_reset_postdata(); ?>
  157.  
  158.             <!-- Page Navigation  -->
  159.             <div class="pagination wp-pagenavi">
  160.                 <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?>
  161.                 <?php wp_link_pages(); ?>
  162.                 <?php } ?>
  163.             </div>
  164.  
  165.             <?php else : ?>
  166.  
  167.                 <div id="post-0" <?php post_class(); ?>>
  168.                
  169.                     <h2 class="entry-title"><?php _e('Error 404 - Not Found', 'amplifier') ?></h2>
  170.  
  171.                     <div class="entry-content">
  172.                         <p><?php _e('Sorry, but you are looking for something that isn\'t here.', 'amplifier') ?></p>
  173.  
  174.                     </div><!-- .entry-content -->
  175.  
  176.                 </div><!-- end #post-0 -->
  177.  
  178.             <?php endif; ?>
  179.            
  180.         </div><!-- end #post-content-wrap .grid_7 .suffix_1 -->
  181.  
  182.     <?php if ($sidebar_position == 'right') { ?>
  183.  
  184.         <div id="sidebar" class="grid_4">
  185.        
  186.         <?php get_sidebar(); ?>
  187.    
  188.         </div> <!-- end #sidebar .grid_4 -->
  189.    
  190.     <?php } ?>
  191.        
  192.     </div> <!-- end #body-wrap .container_12 -->
  193.    
  194. <?php get_footer(); ?>