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
- * @subpackage Link
- */
- get_header();
- $page_sidebar = 'Blog Sidebar';
- $caption_class = "page_caption";
- ?>
- <!-- Begin content -->
- <div id="content_wrapper" class="cat_width">
- <br class="clear"/>
- <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">
- <h4 class="cufon single black">
- <?php the_title(); ?>
- </h4>
- <div class="post_attribute">
- Posted by: <?php the_author(); ?>
- Tags:
- <?php the_tags(''); ?>
- Posted date:
- <?php the_time('F j, Y'); ?> <?php edit_post_link('edit post', ', ', ''); ?>
- |
- <?php comments_number('No comment', 'Comment', '% Comments'); ?>
- </div>
- </div>
- <?php
- if(has_post_thumbnail(get_the_ID(), 'large'))
- {
- $image_id = get_post_thumbnail_id(get_the_ID());
- $image_url = wp_get_attachment_image_src($image_id, 'large', true);
- $pp_blog_image_width = get_option('pp_blog_image_width');
- if(empty($pp_blog_image_width))
- {
- $pp_blog_image_width = 550;
- }
- $pp_blog_image_height = get_option('pp_blog_image_height');
- if(empty($pp_blog_image_height))
- {
- $pp_blog_image_height = 200;
- }
- ?>
- <br class="clear"/><br/>
- <div class="post_img">
- <img src="<?php echo get_bloginfo( 'stylesheet_directory' ); ?>/timthumb.php?src=<?php echo $image_url[0]; ?>&w=<?php echo $pp_blog_image_width; ?>&h=<?php echo $pp_blog_image_height; ?>&zc=1" alt="" class="frame"/>
- </div>
- <?php
- }
- ?>
- <br class="clear"/>
- <?php echo the_content(); ?>
- <?php
- $pp_blog_display_share = get_option('pp_blog_display_share');
- if($pp_blog_display_share)
- {
- ?>
- <ul class="social_media">
- <h5 class="cufon"><span>Share This</span></h5>
- <li>
- <a href="http://twitter.com/home?status=<?php the_title(); ?> <?php the_permalink(); ?>" title="Retweet">
- <img src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/share/twitter_32.png" alt=""/>
- </a>
- </li>
- <li>
- <a href="http://delicious.com/post?url=<?php the_permalink(); ?>&title=<?php the_title(); ?>" title="Delicious">
- <img src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/share/delicious_32.png" alt=""/>
- </a>
- </li>
- <li>
- <a href="http://digg.com/submit?url=<?php the_permalink(); ?>&title=<?php the_title(); ?>" title="Digg it">
- <img src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/share/digg_32.png" alt=""/>
- </a>
- </li>
- <li>
- <a href="http://www.facebook.com/share.php?u=<?php the_permalink(); ?>&t=<?php the_title(); ?>" title="Share to Facebook">
- <img src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/share/facebook_32.png" alt=""/>
- </a>
- </li>
- <li>
- <a href="http://posterous.com/share?linkto=<?php the_permalink(); ?>&title=<?php the_title(); ?>" title="Posterous">
- <img src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/share/posterous_32.png" alt=""/>
- </a>
- </li>
- <li>
- <a href="http://www.mixx.com/submit?page_url=<?php the_permalink(); ?>&title=<?php the_title(); ?>" title="Mixx">
- <img src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/share/mixx_32.png" alt=""/>
- </a>
- </li>
- <li>
- <a href="http://www.stumbleupon.com/submit?url=<?php the_permalink(); ?>&title=<?php the_title(); ?>" title="Stumbleupon">
- <img src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/share/stumbleupon_32.png" alt=""/>
- </a>
- </li>
- <li>
- <a href="mailto:?body=&subject=<?php the_title(); ?>" title="Email this">
- <img src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/share/email_32.png" alt=""/>
- </a>
- </li>
- <li>
- <a href="http://www.tumblr.com/share?u=<?php the_permalink(); ?>&t=<?php the_title(); ?>" title="Tumblr">
- <img src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/share/tumblr_32.png" alt=""/>
- </a>
- </li>
- <li>
- <a href="http://reporter.nl.msn.com/?fn=contribute&URL=<?php the_permalink(); ?>&Title=<?php the_title(); ?>" title="MSN">
- <img src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/share/windows_32.png" alt=""/>
- </a>
- </li>
- <li>
- <a href="http://www.google.com/bookmarks/mark?op=edit&bkmk=<?php the_permalink(); ?>&title=<?php the_title(); ?>&annotation=" title="Google Bookmark">
- <img src="<?php bloginfo( 'stylesheet_directory' ); ?>/images/share/google_32.png" alt=""/>
- </a>
- </li>
- </ul>
- <?php
- } //end if show share this
- ?>
- </div>
- <!-- End each blog post -->
- <div class="post_wrapper">
- <?php
- $pp_blog_display_author = get_option('pp_blog_display_author');
- if($pp_blog_display_author)
- {
- ?>
- <br class="clear"/>
- <h5 class="cufon"><span>About the author</span></h5>
- <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_link(); ?></strong><br/>
- <?php the_author_meta('description'); ?>
- </div>
- </div>
- <?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"/><br/><br/><h5 class="cufon"><span>Related Posts</span></h5><br class="clear"/>';
- ?>
- <div class="related_posts">
- <?php
- global $have_related;
- while ($my_query->have_posts()) : $my_query->the_post();
- $have_related = TRUE;
- ?>
- <?php
- if(has_post_thumbnail($post->ID, 'large'))
- {
- $image_id = get_post_thumbnail_id($post->ID);
- $image_url = wp_get_attachment_image_src($image_id, 'large', true);
- ?>
- <a href="<?php the_permalink() ?>" rel="bookmark" class="alignleft" title="Permanent Link to <?php the_title_attribute(); ?>"><img src="<?php bloginfo( 'stylesheet_directory' ); ?>/timthumb.php?src=<?php echo $image_url[0]; ?>&h=100&w=165&zc=1" alt="" class="frame"/>
- </a>
- <?php
- }
- ?>
- <div class="related_post_desc left">
- <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>
- <br/><br/>
- <?php echo pp_substr(strip_tags(strip_shortcodes($post->post_content)), 120); ?>
- </div>
- <br class="clear"/><br/>
- <?php
- endwhile;
- wp_reset_query();
- ?>
- </div>
- <?php
- }
- }
- ?>
- <?php
- } //end if show related
- ?>
- <?php comments_template( '' ); ?>
- <?php wp_link_pages(); endwhile; endif; ?>
- </div>
- </div>
- <div class="sidebar_wrapper">
- <br class="clear"/>
- <div class="sidebar">
- <div class="content">
- <ul class="sidebar_widget">
- <?php dynamic_sidebar($page_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