Guest User

Untitled

a guest
Feb 15th, 2013
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 10.19 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3.         <div id="main">
  4.        
  5.             <?php while(have_posts()): the_post(); ?>
  6.        
  7.             <?php if(get_option('pyre_posts_navigation') == 'On'): ?>
  8.             <div class="post-navigation">
  9.                 <div class="alignleft"><?php previous_post_link('%link', '&larr; ' . __('Previous Post', 'pyre'), 'no'); ?></div>
  10.                 <div class="alignright"><?php next_post_link('%link', __('Next Post', 'pyre') . ' &rarr;', 'no'); ?></div>
  11.                
  12.                 <div class="clear"></div>
  13.             </div>
  14.             <?php endif; ?>
  15.                
  16.             <div id="post-wrapper" <?php post_class(); ?>>
  17.  
  18.                 <div id="post-header">
  19.                    
  20.                     <h1><?php the_title(); ?></h1>
  21.                    
  22.                     <span class="post-comment-box"><?php comments_popup_link('0', '1', '%'); ?></span>
  23.                        
  24.                     <div class="post-meta">
  25.                         <span class="author"><?php the_author_posts_link() ?></span>
  26.                         <span class="date"><?php the_date('F d, Y'); ?></span>
  27.                         <?php if(get_option('pyre_categories') == 'On'): ?>
  28.                         <span class="category"><?php the_category(', '); ?></span>
  29.                         <?php endif; ?>
  30.                     </div>
  31.                        
  32.                 </div>
  33.            
  34.                 <div id="post">
  35.                    
  36.                     <?php if(has_post_thumbnail() && get_option('pyre_posts_featured') == 'On'): ?>
  37.                     <?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'featured-image'); ?>
  38.                     <img src="<?php echo $image[0]; ?>" alt="<?php the_title(); ?>" class="featured-image" width="600" />
  39.                     <?php endif; ?>
  40.                    
  41.                     <div class="post-content">
  42.                        
  43.                         <?php if(
  44.                         (
  45.                             get_post_meta($post->ID, 'pyre_overall_score', true) ||
  46.                             (get_post_meta($post->ID, 'pyre_critera_1', true) && get_post_meta($post->ID, 'pyre_critera_1_score', true)) ||
  47.                             (get_post_meta($post->ID, 'pyre_critera_2', true) && get_post_meta($post->ID, 'pyre_critera_2_score', true)) ||
  48.                             (get_post_meta($post->ID, 'pyre_critera_3', true) && get_post_meta($post->ID, 'pyre_critera_3_score', true)) ||
  49.                             (get_post_meta($post->ID, 'pyre_critera_4', true) && get_post_meta($post->ID, 'pyre_critera_4_score', true)) ||
  50.                             (get_post_meta($post->ID, 'pyre_critera_5', true) && get_post_meta($post->ID, 'pyre_critera_5_score', true))
  51.                         )
  52.                         ): ?>
  53.                         <div class="post-review">
  54.                             <?php if(get_post_meta($post->ID, 'pyre_overall_score', true)): ?>
  55.                             <div class="overall-score"><img src="<?php bloginfo('template_directory'); ?>/images/stars/big_<?php echo get_post_meta($post->ID, 'pyre_overall_score', true); ?>.png" alt="" /></div>
  56.                             <?php endif; ?>
  57.                             <ul>
  58.                                 <?php if(get_post_meta($post->ID, 'pyre_critera_1', true)): ?>
  59.                                 <li><?php echo get_post_meta($post->ID, 'pyre_critera_1', true); ?> <span class="score"><img src="<?php bloginfo('template_directory'); ?>/images/stars/<?php echo get_post_meta($post->ID, 'pyre_critera_1_score', true); ?>.png" alt="" /></span></li>
  60.                                 <?php endif; ?>
  61.                                 <?php if(get_post_meta($post->ID, 'pyre_critera_2', true)): ?>
  62.                                 <li><?php echo get_post_meta($post->ID, 'pyre_critera_2', true); ?> <span class="score"><img src="<?php bloginfo('template_directory'); ?>/images/stars/<?php echo get_post_meta($post->ID, 'pyre_critera_2_score', true); ?>.png" alt="" /></span></li>
  63.                                 <?php endif; ?>
  64.                                 <?php if(get_post_meta($post->ID, 'pyre_critera_3', true)): ?>
  65.                                 <li><?php echo get_post_meta($post->ID, 'pyre_critera_3', true); ?> <span class="score"><img src="<?php bloginfo('template_directory'); ?>/images/stars/<?php echo get_post_meta($post->ID, 'pyre_critera_3_score', true); ?>.png" alt="" /></span></li>
  66.                                 <?php endif; ?>
  67.                                 <?php if(get_post_meta($post->ID, 'pyre_critera_4', true)): ?>
  68.                                 <li><?php echo get_post_meta($post->ID, 'pyre_critera_4', true); ?> <span class="score"><img src="<?php bloginfo('template_directory'); ?>/images/stars/<?php echo get_post_meta($post->ID, 'pyre_critera_4_score', true); ?>.png" alt="" /></span></li>
  69.                                 <?php endif; ?>
  70.                                 <?php if(get_post_meta($post->ID, 'pyre_critera_5', true)): ?>
  71.                                 <li><?php echo get_post_meta($post->ID, 'pyre_critera_5', true); ?> <span class="score"><img src="<?php bloginfo('template_directory'); ?>/images/stars/<?php echo get_post_meta($post->ID, 'pyre_critera_5_score', true); ?>.png" alt="" /></span></li>
  72.                                 <?php endif; ?>
  73.                             </ul>
  74.                         </div>
  75.                         <?php endif; ?>
  76.                        
  77.                         <?php the_content(); ?>
  78.                        
  79.                         <div class="clear"></div>
  80.                        
  81.                         <?php wp_link_pages(); ?>
  82.                    
  83.                     </div>
  84.                    
  85.                     <?php if(get_option('pyre_tags') == 'On'): ?>
  86.                     <div class="post-tags">
  87.                         <?php the_tags('', ''); ?>
  88.                     </div>
  89.                     <?php endif; ?>
  90.                
  91.                 </div>
  92.                
  93.                 <?php if(get_option('pyre_author') == 'On'): ?>
  94.                 <div class="post-box-wrapper first">
  95.                
  96.                     <div class="post-box">
  97.                    
  98.                         <h5>About the Author</h5>
  99.                         <?php echo get_avatar(get_the_author_meta('email'), '75'); ?>
  100.                         <p><?php the_author_meta("description"); ?></p>
  101.                         <?php if(get_the_author_meta('twitter') || get_the_author_meta('facebook')): ?>
  102.                         <p>
  103.                             <?php if(get_the_author_meta('twitter')): ?>
  104.                             <a href='http://twitter.com/<?php echo get_the_author_meta('twitter'); ?>'>Twitter</a>
  105.                             <?php endif; ?>
  106.                            
  107.                             <?php if(get_the_author_meta('twitter') || get_the_author_meta('facebook')): ?>
  108.                             -
  109.                             <?php endif; ?>
  110.                            
  111.                             <?php if(get_the_author_meta('facebook')): ?>
  112.                             <a href='http://facebook.com/<?php echo get_the_author_meta('facebook'); ?>'>Facebook</a>
  113.                             <?php endif; ?>
  114.                         </p>
  115.                         <?php endif; ?>
  116.                     </div>
  117.                
  118.                 </div>
  119.                 <?php endif; ?>
  120.                
  121.                 <?php $tags = get_the_tags(); ?>
  122.                 <?php if($tags): ?>
  123.                 <?php $related = get_related_posts($post->ID, $tags); ?>
  124.                 <?php if($related->have_posts() && get_option('pyre_related') == 'On'): ?>
  125.                 <?php $count = 1; ?>
  126.                 <div class="post-box-wrapper">
  127.                
  128.                     <div class="post-box">
  129.                    
  130.                         <h5>Related Posts</h5>
  131.                        
  132.                         <?php while($related->have_posts()): $related->the_post(); ?>
  133.                         <?php if($count == 4): $count = 1; endif; if($count == 3): $class = 'last'; else: $class = ''; endif; ?>
  134.                         <?php if(has_post_thumbnail()): ?>
  135.                         <?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'related-posts-image'); ?>
  136.                         <div class="related-item <?php echo $class; ?>">
  137.                             <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img src="<?php echo $image[0]; ?>" alt="<?php the_title(); ?>" /></a>
  138.                         </div>
  139.                         <?php endif; ?>
  140.                         <?php $count++; endwhile; ?>
  141.                    
  142.                     </div>
  143.                
  144.                 </div>
  145.                 <?php endif; ?>
  146.                 <?php endif; ?>
  147.                 <?php wp_reset_query(); ?>
  148.                
  149.                 <?php if(
  150.                     get_option('pyre_twitter') == 'On' ||
  151.                     get_option('pyre_facebook') == 'On' ||
  152.                     get_option('pyre_digg') == 'On' ||
  153.                     get_option('pyre_stumbleupon') == 'On' ||
  154.                     get_option('pyre_reddit') == 'On' ||
  155.                     get_option('pyre_tumblr') == 'On' ||
  156.                     get_option('pyre_email') == 'On' ||
  157.                     get_option('pyre_google') == 'On'
  158.                 ): ?>
  159.                 <div class='post-share'>
  160.                     <?php if(get_option('pyre_twitter') == 'On'): ?>
  161.                     <div class='twitter-share share-widget'>
  162.                         <a href="http://twitter.com/share" class="twitter-share-button" data-text='<?php the_title(); ?>' data-count="vertical">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
  163.                     </div>
  164.                     <?php endif; ?>
  165.                     <?php if(get_option('pyre_facebook') == 'On'): ?>
  166.                     <div class='facebook-share share-widget'>
  167.                         <iframe src="//www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;send=false&amp;layout=box_count&amp;width=46&amp;show_faces=true&amp;action=like&amp;colorscheme=light&amp;font=arial&amp;height=65" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:46px; height:65px;" allowTransparency="true"></iframe>
  168.                     </div>
  169.                     <?php endif; ?>
  170.                     <?php if(get_option('pyre_digg') == 'On'): ?>
  171.                     <div class='digg-share share-widget'>
  172.                         <script type="text/javascript">
  173.                         (function() {
  174.                         var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
  175.                         s.type = 'text/javascript';
  176.                         s.async = true;
  177.                         s.src = 'http://widgets.digg.com/buttons.js';
  178.                         s1.parentNode.insertBefore(s, s1);
  179.                         })();
  180.                         </script>
  181.                         <a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;title=<?php echo urlencode(get_the_title()); ?>"></a>
  182.                     </div>
  183.                     <?php endif; ?>
  184.                     <?php if(get_option('pyre_stumbleupon') == 'On'): ?>
  185.                     <div class='stumbleupon-share share-widget'>
  186.                         <script src="http://www.stumbleupon.com/hostedbadge.php?s=5"></script>
  187.                     </div>
  188.                     <?php endif; ?>
  189.                     <?php if(get_option('pyre_reddit') == 'On'): ?>
  190.                     <div class='reddit-share share-widget'>
  191.                         <script type="text/javascript" src="http://www.reddit.com/static/button/button2.js"></script>
  192.                     </div>
  193.                     <?php endif; ?>
  194.                     <?php if(get_option('pyre_tumblr') == 'On'): ?>
  195.                     <div class='tumblr-share share-widget'>
  196.                         <a href="http://www.tumblr.com/share" title="Share on Tumblr" style="display:inline-block; text-indent:-9999px; overflow:hidden; width:62px; height:20px; background:url('http://platform.tumblr.com/v1/share_2.png') top left no-repeat transparent;">Share on Tumblr</a>
  197.                     </div>
  198.                     <?php endif; ?>
  199.                     <?php if(get_option('pyre_email') == 'On'): ?>
  200.                     <div class='email-share share-widget'>
  201.                         <a href="mailto:?subject=<?php the_title(); ?>&amp;body=<?php the_permalink(); ?>"><img src='<?php bloginfo('template_url'); ?>/images/email-share.png' alt='Email Share' /></a>
  202.                     </div>
  203.                     <?php endif; ?>
  204.                     <?php if(get_option('pyre_google') == 'On'): ?>
  205.                     <div class='google-share share-widget'>
  206.                         <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
  207.                         <g:plusone size="tall"></g:plusone>
  208.                     </div>
  209.                     <?php endif; ?>
  210.                 </div>
  211.                 <?php endif; ?>
  212.                
  213.                 <div id="comments" class="post-box-wrapper">
  214.                    
  215.                     <div class="post-box">
  216.                    
  217.                         <?php comments_template(); ?>
  218.                    
  219.                     </div>
  220.                    
  221.                 </div>
  222.            
  223.             </div>
  224.            
  225.             <?php endwhile; ?>
  226.            
  227.         </div>
  228.        
  229. <?php get_sidebar('post'); ?>
  230. <?php get_footer(); ?>
Add Comment
Please, Sign In to add comment