Guest User

Untitled

a guest
Jan 19th, 2012
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.10 KB | None | 0 0
  1. <?php get_header(); ?>
  2. <!-- BEGIN MAIN -->
  3. <div id="main">
  4.  
  5. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  6.  
  7. <div class="post-heading">
  8. <h1><?php the_title(); ?></h1>
  9. <span class="heading-author"><?php the_author_posts_link(); ?></span>
  10. <span class="heading-date">Publicado <?php echo human_time_diff(get_the_time('U'), current_time('timestamp')) . ' atrás'; ?></span>
  11. <span class="heading-comments"><?php comments_popup_link(__('Seja o primeiro a comentar »','IziThemes'), __('1 Commentário »','IziThemes'), '% '.__('Comentários »','IziThemes')); ?></span>
  12. <?php edit_post_link(__('Editar','IziThemes'),' | <span>','</span>'); ?>
  13. </div>
  14. <?php if(has_post_thumbnail() & get_post_meta($post->ID, 'izi_featured_image', true)!='disable'): ?>
  15. <div class="post-thumb">
  16. <?php $fullImage = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full'); ?>
  17. <?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'thumb-large'); ?>
  18. <a rel="prettyPhoto">' title="<?php the_title_attribute(); ?>"><img src="<?php echo $image[0]; ?>" alt="<?php the_title_attribute(); ?>" width='612' height='300' /></a>
  19. </div>
  20.  
  21. <?php endif; ?>
  22. <div class="post-entry">
  23. <?php the_content(); ?>
  24. <?php wp_link_pages(); ?>
  25. <div class='clear'></div>
  26. </div>
  27.  
  28. <?php if(
  29. $options['twitter'] == 'On' ||
  30. $options['facebook'] == 'On' ||
  31. $options['digg'] == 'On' ||
  32. $options['stumbleupon'] == 'On' ||
  33. $options['reddit'] == 'On' ||
  34. $options['tumblr'] == 'On' ||
  35. $options['email'] == 'On' ||
  36. $options['google'] == 'On'
  37. ): ?>
  38. <div class='post-share'>
  39. <?php if($options['twitter'] == 'On'): ?>
  40. <div class='twitter-share share-widget'>
  41. <a href="http://twitter.com/share">' data-count="vertical">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
  42. </div>
  43. <?php endif; ?>
  44. <?php if($options['facebook'] == 'On'): ?>
  45. <div class='facebook-share share-widget'>
  46. <iframe src="http://www.facebook.com/plugins/like.php?app_id=149766198425277&href=<?php echo urlencode(get_permalink($post->ID)); ?>&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:50px; height:60px;" allowTransparency="true"></iframe>
  47. </div>
  48. <?php endif; ?>
  49. <?php if($options['digg'] == 'On'): ?>
  50. <div class='digg-share share-widget'>
  51. <script type="text/javascript">
  52. (function() {
  53. var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
  54. s.type = 'text/javascript';
  55. s.async = true;
  56. s.src = 'http://widgets.digg.com/buttons.js';
  57. s1.parentNode.insertBefore(s, s1);
  58. })();
  59. </script>
  60. <a>ID)); ?>&title=<?php echo urlencode(get_the_title()); ?>"></a>
  61. </div>
  62. <?php endif; ?>
  63. <?php if($options['stumbleupon'] == 'On'): ?>
  64. <div class='stumbleupon-share share-widget'>
  65. <script src="http://www.stumbleupon.com/hostedbadge.php?s=5"></script>
  66. </div>
  67. <?php endif; ?>
  68. <?php if($options['reddit'] == 'On'): ?>
  69. <div class='reddit-share share-widget'>
  70. <script type="text/javascript" src="http://www.reddit.com/static/button/button2.js"></script>
  71. </div>
  72. <?php endif; ?>
  73. <?php if($options['tumblr'] == 'On'): ?>
  74. <div class='tumblr-share share-widget'>
  75. <a href="http://www.tumblr.com/share" title="Share on Tumblr">Share on Tumblr</a>
  76. </div>
  77. <?php endif; ?>
  78. <?php if($options['email'] == 'On'): ?>
  79. <div class='email-share share-widget'>
  80. <a>&body=<?php the_permalink(); ?>"><img src='<?php bloginfo('template_directory'); ?>/images/email-share.png' alt='Email Share' /></a>
  81. </div>
  82. <?php endif; ?>
  83. <?php if($options['google'] == 'On'): ?>
  84. <div class='google-share share-widget'>
  85. <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
  86. <g:plusone size="tall"></g:plusone>
  87. </div>
  88. <?php endif; ?>
  89. </div>
  90. <?php endif; ?>
  91.  
  92. <div class="post-meta">
  93. <?php if($options['tags'] == 'On'): ?>
  94. <div class="post-meta-tags"><?php the_tags('<strong>' . __("TAGS", 'IziThemes') . '</strong> <span class="meta-arrow">»</span> ',', '); ?></div>
  95. <?php endif; ?>
  96.  
  97. <?php if($options['categories'] == 'On'): ?>
  98. <div class="post-meta-cats"><strong><?php _e('POSTED IN', 'IziThemes'); ?></strong> <span class="meta-arrow">»</span> <?php the_category(', ') ?></div>
  99. <?php endif; ?>
  100. </div>
  101.  
  102. <?php if($options['author'] == 'On'): ?>
  103. <div class="post-author">
  104. <?php echo get_avatar(get_the_author_meta('email'), '70'); ?>
  105. <h5><em><?php _e('Sobre o autor', 'IziThemes'); ?></em> <small><?php _e('Leia outros textos de'); ?> <?php the_author_posts_link(); ?></small></h5>
  106. <div class="author-descrip"><?php the_author_meta("description"); ?></div>
  107. <?php if(get_the_author_meta('twitter') || get_the_author_meta('facebook')): ?>
  108. <p>
  109.  
  110. <?php if(get_the_author_meta('twitter')): ?>
  111. <a>'>Twitter</a>
  112. <?php endif; ?>
  113.  
  114. <?php if(get_the_author_meta('twitter') || get_the_author_meta('facebook')): ?>
  115. -
  116. <?php endif; ?>
  117.  
  118. <?php if(get_the_author_meta('facebook')): ?>
  119. <a>'>Facebook</a>
  120. <?php endif; ?>
  121. </p>
  122. <?php endif; ?>
  123. </div>
  124. <?php endif; ?>
  125.  
  126. <?php
  127. if($options['related'] == 'On' ){
  128. $this_post = $post->ID; // get ID of current post
  129. $category = get_the_category($this_post); //get first current category ID
  130. $posts = get_posts('exclude='.$this_post.'&numberposts=4&orderby=rand&category=' . $category[0]->cat_ID . '');
  131. if($posts){ ?>
  132.  
  133. <div class='homepage-widget'>
  134. <div class="block full">
  135. <h3><?php _e('Leia também','IziThemes');?></h3>
  136.  
  137. <?php
  138. $endRow = 0;
  139. $columns = 2; // number of columns
  140. $hloopRow1 = 0; // first row flag
  141. $count = 1;
  142. ?>
  143. <div class="related-posts">
  144. <div class="row">
  145. <?php foreach($posts as $post) {?>
  146. <?php if($endRow == 0 && $hloopRow1++ != 0) echo " <div class=\"row\">"; //?>
  147. <div class="related-item<?php if($count%$columns==0) echo ' last';?>">
  148. <?php if(has_post_thumbnail()): ?>
  149. <?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'thumb-small'); ?>
  150.  
  151. <a>' title='<?php the_title_attribute(); ?>'><img src="<?php echo $image[0]; ?>" alt="<?php the_title_attribute(); ?>" width='60' height='60' /></a>
  152. <?php else: ?>
  153.  
  154. <a>' title='<?php the_title_attribute(); ?>'><img src="<?php bloginfo('template_directory'); ?>/images/thumb-small.png" alt="<?php the_title_attribute(); ?>" width='60' height='60' /></a>
  155. <?php endif; ?>
  156. <h4><a>' title='<?php the_title_attribute(); ?>'><?php the_title(); ?></a></h4>
  157. <span class="block-meta"><?php the_time('F j, Y'); ?></span>
  158. <p><?php echo text_trim(get_the_excerpt(get_permalink($post->ID)),25,'...'); ?></p>
  159. </div>
  160. <?php
  161. $endRow++;
  162. if($endRow >= $columns) { ?>
  163. <div class="clear"></div></div>
  164. <?php
  165. $endRow = 0;
  166. } //end if
  167. $count++;
  168. ?>
  169. <?php };// end foreach ?>
  170. <?php
  171. if($endRow != 0) {
  172. while ($endRow < $columns) {
  173. if($endRow==($columns-1)) echo('<div class="related-item last"> </div>');
  174. else echo('<div class="related-item"> </div>');
  175.  
  176. $endRow++;
  177. }
  178. echo("<div class=\"clear\"></div></div>");
  179. }?>
  180. </div><!-- .related-posts -->
  181.  
  182. </div>
  183. </div>
  184.  
  185. <?php
  186. }
  187. }
  188. ?>
  189. <?php wp_reset_query(); ?>
  190.  
  191. <div id="comments">
  192.  
  193. <?php comments_template(); ?>
  194.  
  195. </div>
  196.  
  197. <?php endwhile; endif; ?>
  198.  
  199. </div>
  200. <!-- END MAIN -->
  201.  
  202. <?php get_sidebar(); ?>
  203.  
  204. <?php get_footer(); ?>>
Add Comment
Please, Sign In to add comment