1. <?php get_header(); ?>
  2. <?php $GLOBALS['sbg_sidebar'] = get_post_meta(get_the_ID(), 'sbg_selected_sidebar_replacement', true);?>
  3. <!-- begin content -->
  4. <section id="content_main" class="clearfix">
  5. <div class="row main_content">
  6. <div class="<?php $full= get_post_custom_values('full_widthjellywp_checkbox'); if($full[0]==1){echo "twelve";}else{echo "eight";}?> columns" id="content">
  7. <div class="widget_container content_page">
  8. <!-- start post -->
  9. <div <?php post_class(''); ?> id="post-<?php the_ID(); ?>" itemscope="" itemtype="http://schema.org/Review">
  10. <?php if (have_posts()) { while (have_posts()) { the_post(); ?>
  11. <?php
  12. $categories = get_the_category();
  13. $tags = get_the_tags();
  14. $post_id = get_the_ID();
  15. ?>
  16. <div class="single_post_title">
  17. <h1 itemprop="name" class="entry-title single-post-title"><?php the_title(); echo ' ['.$categories[0]->cat_name .']' ; ?></h1>
  18. <?php echo jellywp_single_post_meta($post_id);?>
  19. </div>
  20. <div class="clearfix"></div>
  21. <?php if(of_get_option('blog_feautre_image') == 1) { ?>
  22. <?php $blog_feautre_image = wp_get_attachment_url( get_post_thumbnail_id($post_id, 'full') ); ?>
  23. <?php if(!empty($blog_feautre_image)) { ?>
  24. <img src="<?php echo $blog_feautre_image; ?>" alt="<?php the_title(); ?>" />
  25. <?php }}?>
  26. <div class="post_content"><?php the_content(); ?></div>
  27. <?php
  28. $defaults_link = array(
  29. 'before' => '<div class="pagination">' . __( 'Continued On Page:' ),
  30. 'after' => '</div>',
  31. 'link_before' => '<span class"box">',
  32. 'link_after' => '</span>',
  33. 'next_or_number' => 'number',
  34. 'separator' => ' ',
  35. 'nextpagelink' => __( 'Next page' ),
  36. 'previouspagelink' => __( 'Previous page' ),
  37. 'pagelink' => '%',
  38. 'echo' => 1,
  39. 'highlight' => 'b'
  40. );
  41. wp_link_pages( $defaults_link ); ?>
  42. <?php if(of_get_option('disable_post_review') !=1){?>
  43. <?php if(total_score_post(get_the_ID())){?>
  44. <div class="reviewbox">
  45. <div class="review_header"><h3> <span itemprop="itemreviewed"><?php _e('Reviews', 'jelly_text_main'); ?></span></h3></div>
  46. <ul class="progress-bar">
  47. <li class="title-score"><span class="review_bar-title"><?php $text1= get_post_custom_values('review_option1jellywp_text'); echo $text1[0]; ?></span><span class="review_score"><?php $text1= get_post_custom_values('review_option1jellywp_slider'); echo $text1[0]; ?></span></li>
  48. <li class="review_bar">
  49. <div class="review_bar-content" style="width:<?php $rate1= get_post_custom_values('review_option1jellywp_slider'); echo $rate1[0] * 10; ?>%"></div>
  50. </li>
  51. <li class="title-score"><span class="review_bar-title"><?php $text2= get_post_custom_values('review_option2jellywp_text'); echo $text2[0]; ?></span><span class="review_score"><?php $text2= get_post_custom_values('review_option2jellywp_slider'); echo $text2[0]; ?></span></li>
  52. <li class="review_bar">
  53. <div class="review_bar-content" style="width:<?php $rate2= get_post_custom_values('review_option2jellywp_slider'); echo $rate2[0] * 10; ?>%"></div>
  54. </li>
  55. <li class="title-score"><span class="review_bar-title"><?php $text3= get_post_custom_values('review_option3jellywp_text'); echo $text3[0]; ?></span><span class="review_score"><?php $text3= get_post_custom_values('review_option3jellywp_slider'); echo $text3[0]; ?></span></li>
  56. <li class="review_bar">
  57. <div class="review_bar-content" style="width:<?php $rate3= get_post_custom_values('review_option3jellywp_slider'); echo $rate3[0] * 10; ?>%"></div>
  58. </li>
  59. <li class="title-score"><span class="review_bar-title"><?php $text4= get_post_custom_values('review_option4jellywp_text'); echo $text4[0]; ?></span><span class="review_score"><?php $text4= get_post_custom_values('review_option4jellywp_slider'); echo $text4[0]; ?></span></li>
  60. <li class="review_bar">
  61. <div class="review_bar-content" style="width:<?php $rate4= get_post_custom_values('review_option4jellywp_slider'); echo $rate4[0] * 10; ?>%"></div>
  62. </li>
  63. <li class="title-score"><span class="review_bar-title"><?php $text5= get_post_custom_values('review_option5jellywp_text'); echo $text5[0]; ?></span><span class="review_score"><?php $text5= get_post_custom_values('review_option5jellywp_slider'); echo $text5[0]; ?></span></li>
  64. <li class="review_bar">
  65. <div class="review_bar-content" style="width:<?php $rate5= get_post_custom_values('review_option5jellywp_slider'); echo $rate5[0] * 10; ?>%"></div>
  66. </li>
  67. <?php $total_review = total_score_post(get_the_ID())?>
  68. <li class="review_bar total-review-bar">
  69. <div class="total_review_bar-content"><?php echo round($total_review / 5 ,1);?> <p class="score-label">Score</p></div>
  70. <span class="review_bar-title"> <?php if($review_summer = get_post_custom_values('review_jellywp_wysiwyg')){?>
  71. <div class="review-summery">
  72. <?php echo $review_summer[0]; ?>
  73. </div>
  74. <?php }?></span>
  75. </li>
  76. </ul>
  77. <div itemprop="reviewRating" itemscope="" itemtype="http://schema.org/Rating">
  78. <meta itemprop="worstRating" content = "1">
  79. <meta itemprop="ratingValue" content = "<?php echo round($total_review / 10 ,1);?>">
  80. <meta itemprop="bestRating" content = "5">
  81. </div>
  82. <div class="clearfix"></div>
  83. </div>
  84. <?php }}?>
  85. <hr class="none" />
  86. <?php if(of_get_option('disable_post_tag') !=1){?>
  87. <div class="tag-cat">
  88. <?php if (!empty($tags)){ ?><?php the_tags('', ' '); ?> <?php } ?>
  89. </div>
  90. <?php }?>
  91. <div class="clearfix"></div>
  92. <?php if(of_get_option('disable_post_share') !=1){?>
  93. <div class="share-post">
  94. <ul>
  95. <li><a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php echo get_permalink(); ?>" data-text="<?php the_title(); ?>" data-via="" data-lang="en">tweet</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></li>
  96. <li><script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/Share" data-url="<?php echo get_permalink(); ?>" data-counter="right"></script></li>
  97. <li style="width:80px;"><script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"></script><a href="http://pinterest.com/pin/create/button/?url=<?php echo get_permalink(); ?>&amp;media=<?php $fullimage = wp_get_attachment_url( get_post_thumbnail_id($post_id, 'full') ); if(!empty($fullimage)) {echo $fullimage;}?>" class="pin-it-button" count-layout="horizontal"><img border="0" src="http://assets.pinterest.com/img/PinExt.png" title="Pin It"/></a></li>
  98. <li>
  99. <div id="fb-root"></div>
  100. <script>(function(d, s, id) {
  101. var js, fjs = d.getElementsByTagName(s)[0];
  102. if (d.getElementById(id)) return;
  103. js = d.createElement(s); js.id = id;
  104. js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
  105. fjs.parentNode.insertBefore(js, fjs);
  106. }(document, 'script', 'facebook-jssdk'));</script>
  107. <div class="fb-like" data-href="<?php echo get_permalink(); ?>" data-send="false" data-layout="button_count" data-width="90" data-show-faces="false"></div>
  108. </li>
  109. <li>
  110. <div class="g-plusone" data-size="medium" data-href="<?php the_permalink(); ?>"></div>
  111. <script type='text/javascript'>
  112. (function() {
  113. var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
  114. po.src = 'https://apis.google.com/js/plusone.js';
  115. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  116. })();
  117. </script>
  118. </li>
  119. </ul>
  120. <div class="clearfix"></div>
  121. </div>
  122. <?php }?>
  123. <div class="postnav">
  124. <span class="left">
  125. <?php
  126. $next_post = get_next_post();
  127. if (!empty($next_post)){
  128. ?>
  129. <i class="fa fa-angle-double-left"></i>
  130. <a href="<?php echo get_permalink($next_post->ID); ?>" id="prepost"><span><?php _e('Previous Post', 'jelly_text_main'); ?></span><?php echo $next_post->post_title; ?></a>
  131. <?php } ?>
  132. </span>
  133. <span class="right">
  134. <?php
  135. $prev_post = get_previous_post();
  136. if (!empty($prev_post)){
  137. ?>
  138. <i class="fa fa-angle-double-right"></i>
  139. <a href="<?php echo get_permalink($prev_post->ID); ?>" id="nextpost"><span><?php _e('Next Post', 'jelly_text_main'); ?></span><?php echo $prev_post->post_title; ?></a>
  140. <?php } ?>
  141. </span>
  142. </div>
  143. <hr class="none">
  144. <?php if(of_get_option('disable_post_author_box') !=1){?>
  145. <div class="auth">
  146. <div class="author-info">
  147. <div class="author-avatar"><?php echo get_avatar(get_the_author_meta('user_email'), 90); ?></div>
  148. <div class="author-description"><h5><a itemprop="author" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author_meta( 'display_name' ); ?></a></h5>
  149. <p><?php echo get_the_author_meta('description'); ?></p>
  150. <ul class="author-social clearfix">
  151. <?php if ((get_the_author_meta('url')) != ''){ ?>
  152. <li><a href="<?php echo get_the_author_meta('url'); ?>" target="_blank"><img src="<?php echo get_template_directory_uri(); ?>/img/icons/website.png"></a></li>
  153. <?php }?>
  154. <?php if ((get_the_author_meta('email')) != ''){ ?>
  155. <li><a href="mailto:<?php echo get_the_author_meta('email'); ?>" target="_blank"><img src="<?php echo get_template_directory_uri(); ?>/img/icons/email.png"></a></li>
  156. <?php }?>
  157. <?php if ((get_the_author_meta('linkedin')) != ''){ ?>
  158. <li><a href="<?php echo get_the_author_meta('linkedin'); ?>" target="_blank"><img src="<?php echo get_template_directory_uri(); ?>/img/icons/link.png"></a></li>
  159. <?php }?>
  160. <?php if ((get_the_author_meta('rss')) != ''){ ?>
  161. <li><a href="<?php echo get_the_author_meta('rss'); ?>" target="_blank"><img src="<?php echo get_template_directory_uri(); ?>/img/icons/rss.png"></a></li>
  162. <?php }?>
  163. <?php if ((get_the_author_meta('pinterest')) != ''){ ?>
  164. <li><a href="<?php echo get_the_author_meta('pinterest'); ?>" target="_blank"><img src="<?php echo get_template_directory_uri(); ?>/img/icons/pin.png"></a></li>
  165. <?php }?>
  166. <?php if ((get_the_author_meta('devianart')) != ''){ ?>
  167. <li><a href="<?php echo get_the_author_meta('devianart'); ?>" target="_blank"><img src="<?php echo get_template_directory_uri(); ?>/img/icons/d-art.png"></a></li>
  168. <?php }?>
  169. <?php if ((get_the_author_meta('dribble')) != ''){ ?>
  170. <li><a href="<?php echo get_the_author_meta('dribble'); ?>" target="_blank"><img src="<?php echo get_template_directory_uri(); ?>/img/icons/dribble.png"></a></li>
  171. <?php }?>
  172. <?php if ((get_the_author_meta('behance')) != ''){ ?>
  173. <li><a href="<?php echo get_the_author_meta('behance'); ?>" target="_blank"><img src="<?php echo get_template_directory_uri(); ?>/img/icons/behance.png"></a></li>
  174. <?php }?>
  175. <?php if ((get_the_author_meta('youtube')) != ''){ ?>
  176. <li><a href="<?php echo get_the_author_meta('youtube'); ?>" target="_blank"><img src="<?php echo get_template_directory_uri(); ?>/img/icons/youtube.png"></a></li>
  177. <?php }?>
  178. <?php if ((get_the_author_meta('instagram')) != ''){ ?>
  179. <li><a href="<?php echo get_the_author_meta('instagram'); ?>" target="_blank"><img src="<?php echo get_template_directory_uri(); ?>/img/icons/instagram.png"></a></li>
  180. <?php }?>
  181. <?php if ((get_the_author_meta('twitter')) != ''){ ?>
  182. <li><a href="<?php echo get_the_author_meta('twitter'); ?>" target="_blank"><img src="<?php echo get_template_directory_uri(); ?>/img/icons/twitter.png"></a></li>
  183. <?php }?>
  184. <?php if ((get_the_author_meta('facebook')) != ''){ ?>
  185. <li><a href="<?php echo get_the_author_meta('facebook'); ?>" target="_blank"><img src="<?php echo get_template_directory_uri(); ?>/img/icons/facebook.png"></a></li>
  186. <?php }?>
  187. <?php if ((get_the_author_meta('googleplus')) != ''){ ?>
  188. <li><a href="<?php echo get_the_author_meta('googleplus'); ?>" target="_blank"><img src="<?php echo get_template_directory_uri(); ?>/img/icons/google-plus.png"></a></li>
  189. <?php }?>
  190. </ul>
  191. </div>
  192. </div>
  193. </div>
  194. <?php } ?>
  195. <?php } ?>
  196. <?php } // end of the loop. ?>
  197. <?php if(of_get_option('disable_post_related') !=1){?>
  198. <div class="related-posts">
  199. <div class="widget-title"><h2><?php _e('Related articles', 'jelly_text_main'); ?></h2></div>
  200. <div class="clearfix"></div>
  201. <?php
  202. $jellywp_tags = null;
  203. if (!empty($tags)) {
  204. foreach ($tags as $tag) {
  205. $jellywp_tags[] = $tag->term_id;
  206. }
  207. };
  208. $arg_tag = array('tag__in' => $jellywp_tags, 'showposts' => 3, 'post__not_in' => array($post_id));
  209. $post_query = null;
  210. $post_query = new WP_Query($arg_tag);
  211. $post_count = 0;
  212. echo "<ul>";
  213. while ($post_query->have_posts()) {
  214. $post_query->the_post();
  215. $post_id = get_the_ID();
  216. $last = '';
  217. if (++$post_count == 3) {
  218. $last = 'class="last-post"';
  219. }
  220. ?>
  221. <li <?php echo $last; ?>>
  222. <?php
  223. echo '<a class="entry-thumb feature-link" href="' . get_permalink() . '" title="' . the_title_attribute('echo=0') . '">';
  224. // if ( !has_post_thumbnail()) {
  225. // $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post_id ), 'feature-grid' );
  226. $image = catch_that_image_byID(get_the_content());
  227. ?>
  228. <img src="<?php echo get_site_url().'/img/timthumb.php?src='.$image.'&h=280&w=200'; ?>" />
  229. <?php //}else{echo '<img class="no_feature_img" src="'.get_template_directory_uri().'/img/feature_img/feature-grid.jpg'.'">';} ?>
  230. </a>
  231. <h4> <a class="title related-title" href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent link to <?php the_title_attribute(); ?>">
  232. <?php the_title(); ?>
  233. </a></h4>
  234. </li>
  235. <?php
  236. }
  237. wp_reset_query();
  238. echo "</ul>";
  239. ?>
  240. </div>
  241. <?php } ?>
  242. <hr class="none" />
  243. <!-- comment -->
  244. <?php comments_template('', true); ?>
  245. </div>
  246. <!-- end post -->
  247. <div class="brack_space"></div>
  248. </div>
  249. </div>
  250. <?php $full= get_post_custom_values('full_widthjellywp_checkbox'); if($full[0]==1){}else{?>
  251. <div class="four columns" id="sidebar">
  252. <?php
  253. $custom_sidebar = $GLOBALS['sbg_sidebar'][0];
  254. $post_sidebar = of_get_option('post_sidebar','');
  255. if(!empty($post_sidebar)) {
  256. $custom_sidebar = $post_sidebar;
  257. };
  258. foreach ( $GLOBALS['wp_registered_sidebars'] as $sidebar ) {
  259. if($sidebar['name'] == $custom_sidebar)
  260. {
  261. $custom_sidebar = $sidebar['id'];
  262. }
  263. }
  264. if($custom_sidebar) {
  265. if (is_active_sidebar($custom_sidebar)) : dynamic_sidebar($custom_sidebar);
  266. endif;
  267. } else{
  268. if (is_active_sidebar('general-sidebar')) : dynamic_sidebar('general-sidebar');
  269. endif;
  270. }
  271. ?><div class="brack_space"></div>
  272. </div>
  273. <?php }?>
  274. </div>
  275. </section>
  276. <!-- end content -->
  277. <?php get_footer(); ?>