Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Used for blog page when set in 'Reading > Posts page'
- *
- * @package WordPress
- * @subpackage Amplifier
- */
- get_header(); ?>
- <!-- BEGIN CALL TO ACTION -->
- <div class="inner-cta-wrap">
- <div id="call-to-action" class="container_12">
- <!-- TOP SENTENCE -->
- <div id="cta-top" class="grid_12">
- <h3 class="inner-title">
- <?php if(of_get_option('blog_title_strong') != '' || of_get_option('blog_title_subtitle') != '') { // if the blog titles are not empty ?>
- <span class="cta-strong-title"><?php echo stripslashes(of_get_option('blog_title_strong')); ?></span><span class="cta-small-title"> <?php echo stripslashes(of_get_option('blog_title_subtitle')); ?></span>
- <?php } else { // if the blog title is empty, display this placeholder title ?>
- <span class="cta-strong-title">Set this title</span><span class="cta-small-title">// in the theme options panel under 'Pages'!</span>
- <?php } ?>
- </h3>
- </div> <!-- end #cta-top .grid_12-->
- </div> <!-- end .container_12 #call-to-action -->
- </div><!-- end .cta-wrap -->
- <div class="dotted-hr" style="margin-bottom:5px"></div>
- <div class="clear"></div>
- <!-- Begin Main Body -->
- <div class="container_12" id="body-wrap" role="main">
- <div id="breadcrumb-wrap" class="grid_12 breadcrumbs">
- <?php if(function_exists('bcn_display')) { bcn_display(); } ?>
- </div> <!-- end #breadcrumb-wrap .grid_12 -->
- <?php $sidebar_position = of_get_option('sidebar_position'); ?>
- <?php if ($sidebar_position == 'left') { ?>
- <div id="sidebar" class="grid_4 suffix_1 alpha">
- <?php get_sidebar(); ?>
- </div> <!-- end #sidebar .grid_4 -->
- <?php } ?>
- <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">
- <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
- <div class="blog-page-post">
- <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
- <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>
- <!-- Post Meta -->
- <div class="blog-page-meta">
- <ul>
- <li><?php the_time( 'F j, Y' ); ?></li>
- <li><span> / </span><?php comments_popup_link(__('No Comments', 'amplifier'), __('1 Comment', 'amplifier'), __('% Comments', 'amplifier')); ?></li>
- <li><span> / <?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>
- </ul>
- <div class="clear"></div>
- </div> <!-- end .meta -->
- <!-- Featured Image -->
- <?php
- if (has_post_thumbnail()) { /* if the post has a featured image */
- $blog_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), ''); // Get original image size
- $thumb = get_post_thumbnail_id();
- $image = vt_resize( $thumb,'' , 130, 130, true ); // Resize original image
- ?>
- <div class="featured-image image-fade grid_2 alpha">
- <a class="portfolio lightbox" href="<?php echo $blog_image_url[0]; ?>">
- <img src="<?php echo $image[url]; ?>" width="<?php echo $image[width]; ?>" height="<?php echo $image[height]; ?>" title="<?php _e('Click to view image','amplifier'); ?>" />
- </a>
- <div class="blog-more-link grid_2 alpha">
- <a href="<?php the_permalink(); ?>"><?php _e('read more', 'amplifier'); ?> →</a>
- </div>
- </div> <!-- end .featured-image .image-fade -->
- <!-- Post Content -->
- <div class="content grid_5">
- <?php the_excerpt(); ?>
- <!-- Tags -->
- <div class="blog-page-meta">
- <?php // Check if post has tags for related posts
- $tags = wp_get_post_tags($post->ID);
- if ($tags) {
- ?>
- <p class="tags">
- <span class="blog-tags"><?php _e('Tags:', 'amplifier'); ?></span> <?php the_tags('',' ','<br />'); ?>
- </p>
- <?php } // end check if post has tags ?>
- </div> <!-- end .blog-page-meta -->
- </div> <!-- end .content -->
- <?php } elseif (!has_post_thumbnail()) { // if there is no thumbnail ?>
- <!-- Post Content -->
- <div class="content grid_7">
- <?php the_excerpt(); ?>
- <div class="blog-more-link grid_2 alpha">
- <a href="<?php the_permalink(); ?>"><?php _e('read more', 'amplifier'); ?> →</a>
- </div>
- <?php // Check if post has tags for related posts
- $tags = wp_get_post_tags($post->ID);
- if ($tags) {
- ?>
- <!-- Tags -->
- <div class="blog-page-meta grid_5 omega">
- <p class="tags">
- <span class="blog-tags"><?php _e('Tags:', 'amplifier'); ?></span> <?php the_tags('',' ','<br />'); ?>
- </p>
- </div> <!-- end .blog-page-meta -->
- <?php } // end check if post has tags ?>
- </div> <!-- end .content -->
- <?php } ?>
- <div class="clear"></div>
- <div class="dotted-hr"></div>
- </div> <!-- end .blog-page-post -->
- </div> <!-- end post ID <?php the_ID(); ?> -->
- <?php endwhile;
- wp_reset_postdata(); ?>
- <!-- Page Navigation -->
- <div class="pagination wp-pagenavi">
- <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?>
- <?php wp_link_pages(); ?>
- <?php } ?>
- </div>
- <?php else : ?>
- <div id="post-0" <?php post_class(); ?>>
- <h2 class="entry-title"><?php _e('Error 404 - Not Found', 'amplifier') ?></h2>
- <div class="entry-content">
- <p><?php _e('Sorry, but you are looking for something that isn\'t here.', 'amplifier') ?></p>
- </div><!-- .entry-content -->
- </div><!-- end #post-0 -->
- <?php endif; ?>
- </div><!-- end #post-content-wrap .grid_7 .suffix_1 -->
- <?php if ($sidebar_position == 'right') { ?>
- <div id="sidebar" class="grid_4">
- <?php get_sidebar(); ?>
- </div> <!-- end #sidebar .grid_4 -->
- <?php } ?>
- </div> <!-- end #body-wrap .container_12 -->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement