Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * The main template file for display single post page.
- *
- * @package WordPress
- */
- $post_type = get_post_type();
- if($post_type == 'gallery')
- {
- include (TEMPLATEPATH . "/gallery.php");
- exit;
- }
- get_header();
- ?>
- <br class="clear"/>
- <!-- Begin content -->
- <div id="content_wrapper">
- <div class="inner">
- <!-- Begin main content -->
- <div class="inner_wrapper">
- <div class="sidebar_content">
- <?php
- if (have_posts()) : while (have_posts()) : the_post();
- ?>
- <!-- Begin each blog post -->
- <div class="post_wrapper">
- <div class="post_header_wrapper">
- <div class="post_header single_post">
- <h2><?php the_title(); ?></h2>
- </div>
- </div>
- <br class="clear"/>
- <div class="post_wrapper_inner">
- <div class="post_detail space half">
- <img src="<?php echo get_stylesheet_directory_uri(); ?>/images/clock.png" class="middle"/> <?php echo get_the_time('d M Y'); ?>
- <img src="<?php echo get_stylesheet_directory_uri(); ?>/images/author.png" class="middle"/> <?php echo _e( 'Posted by', THEMEDOMAIN ); ?> <?php echo get_the_author(); ?>
- <img src="<?php echo get_stylesheet_directory_uri(); ?>/images/comment_alt2_stroke_14x16.png" class="middle"/> <?php comments_number('0 Comment', '1 Comment', '% Comments'); ?>
- </div>
- </div>
- <?php
- if($post_type != 'reviews')
- {
- ?>
- <br class="clear"/>
- <?php
- }
- ?>
- <div class="post_wrapper_inner">
- <?php
- $pp_blog_single_img = get_option('pp_blog_single_img');
- if(!empty($pp_blog_single_img) && $post_type != 'reviews')
- {
- if(has_post_thumbnail(get_the_ID(), 'home_ft'))
- {
- $image_id = get_post_thumbnail_id(get_the_ID());
- $image_thumb = wp_get_attachment_image_src($image_id, 'home_ft', true);
- }
- if(!empty($image_thumb))
- {
- ?>
- <div class="post_img">
- <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
- <img src="<?php echo $image_thumb[0]; ?>" alt="" class=""/>
- </a>
- </div>
- <?php
- }
- }
- ?>
- <div class="post_inner_wrapper">
- <?php
- $pp_enable_rating = get_option('pp_enable_rating');
- if(!empty($pp_enable_rating) && $post_type != 'reviews')
- {
- echo do_shortcode('[ratings id="'.get_the_ID().'"]');
- ?>
- <br/>
- <?php
- }
- ?>
- <br class="clear"/>
- <?php
- the_content();
- ?>
- </div>
- </div>
- <!-- End each blog post -->
- </div>
- <br class="clear"/>
- <div class="post_wrapper" style="margin-top:15px">
- <div class="post_wrapper_inner">
- <?php
- $pp_blog_display_social = get_option('pp_blog_display_social');
- if(!empty($pp_blog_display_social)):
- ?>
- <ul class="social_media">
- <h5><?php _e( 'Share This', THEMEDOMAIN ); ?></h5><br/>
- <li>
- <a target="_blank" href="http://twitter.com/home?status=<?php the_title()?> <?php the_permalink()?>" title="Retweet">
- <img src="<?php echo get_stylesheet_directory_uri(); ?>/images/social_black/twitter.png" alt=""/>
- </a>
- </li>
- <li>
- <a target="_blank" href="http://digg.com/submit?url=<?php the_permalink()?>&title=<?php the_title()?>" title="Digg it">
- <img src="<?php echo get_stylesheet_directory_uri(); ?>/images/social_black/digg.png" alt=""/>
- </a>
- </li>
- <li>
- <a target="_blank" href="http://www.facebook.com/share.php?u=<?php the_permalink()?>&t=<?php the_title()?>" title="social_black to Facebook">
- <img src="<?php echo get_stylesheet_directory_uri(); ?>/images/social_black/facebook.png" alt=""/>
- </a>
- </li>
- <li>
- <a target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&bkmk=<?php the_permalink()?>&title=<?php the_title()?>&annotation=" title="Google Bookmark">
- <img src="<?php echo get_stylesheet_directory_uri(); ?>/images/social_black/google.png" alt=""/>
- </a>
- </li>
- <li>
- <a target="_blank" href="<?php bloginfo('rss_url'); ?>" title="RSS">
- <img src="<?php echo get_stylesheet_directory_uri(); ?>/images/social_black/rss.png" alt=""/>
- </a>
- </li>
- </ul>
- <?php
- endif; ?>
- <?php
- $pp_blog_display_author = get_option('pp_blog_display_author');
- if($pp_blog_display_author)
- {
- ?>
- <br class="clear"/>
- <h5><?php _e( 'About The Author', THEMEDOMAIN ); ?></h5><br/>
- <div id="about_the_author">
- <div class="thumb"><?php echo get_avatar( get_the_author_meta('email'), '50' ); ?></div>
- <div class="description">
- <strong><?php the_author_posts_link(); ?></strong><br/>
- <?php the_author_meta('description'); ?>
- </div>
- </div><br class="clear"/>
- <?php
- }
- ?>
- <?php
- $pp_blog_display_related = get_option('pp_blog_display_related');
- if($pp_blog_display_related)
- {
- ?>
- <?php
- //for use in the loop, list 5 post titles related to first tag on current post
- $tags = wp_get_post_tags($post->ID);
- if ($tags) {
- $first_tag = $tags[0]->term_id;
- $args=array(
- 'tag__in' => array($first_tag),
- 'post__not_in' => array($post->ID),
- 'showposts'=>3,
- 'caller_get_posts'=>1
- );
- $my_query = new WP_Query($args);
- if( $my_query->have_posts() ) {
- echo '<br class="clear"/><h5>Related Posts</h5><br class="clear"/>';
- ?>
- <div class="related_posts">
- <?php
- global $have_related;
- while ($my_query->have_posts()) : $my_query->the_post();
- $have_related = TRUE;
- ?>
- <div class="each_item">
- <?php
- if(has_post_thumbnail($post->ID, 'related_post'))
- {
- $image_id = get_post_thumbnail_id($post->ID);
- $image_url = wp_get_attachment_image_src($image_id, 'related_post', true);
- ?>
- <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><img src="<?php echo $image_url[0]; ?>" alt="" class="frame"/>
- </a><br/>
- <?php
- }
- ?>
- <div class="content">
- <strong class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></strong>
- <br/>
- <span class="post_attribute"><?php echo get_the_time('F j, Y', $post->ID); ?></span>
- </div>
- </div>
- <?php
- endwhile;
- wp_reset_query();
- ?>
- </div>
- <br class="clear"/>
- <?php
- }
- }
- ?>
- <?php
- } //end if show related
- ?>
- <?php comments_template( '' ); ?>
- <?php comment_form(); ?>
- <br class="clear"/>
- <?php wp_link_pages(); endwhile; endif; ?>
- </div>
- </div>
- </div>
- <div class="sidebar_wrapper">
- <div class="sidebar">
- <div class="content">
- <ul class="sidebar_widget">
- <?php dynamic_sidebar('Single Post Sidebar'); ?>
- </ul>
- </div>
- </div>
- <br class="clear"/>
- <div class="sidebar_bottom"></div>
- </div>
- </div>
- <!-- End main content -->
- <br class="clear"/>
- </div>
- <div class="bottom"></div>
- </div>
- <!-- End content -->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement