Advertisement
Guest User

center

a guest
Dec 22nd, 2012
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.79 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <?php
  4.  
  5. if($single_sidebar_type == 'Sidebar2') { $sidebar_name = 'sidebar2'; }
  6. elseif($single_sidebar_type == 'Sidebar3') { $sidebar_name = 'sidebar3'; }
  7. elseif($single_sidebar_type == 'Sidebar4') { $sidebar_name = 'sidebar4'; }
  8. elseif($single_sidebar_type == 'Sidebar5') { $sidebar_name = 'sidebar5'; }
  9. else{ $sidebar_name = ''; }
  10.  
  11.  
  12. ?>
  13.  
  14.  
  15. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  16.  
  17. <?php
  18.  
  19. $type_name = get_post_type( $post->ID );
  20.  
  21. if(get_post_type( $post->ID ) == 'post' && $single_layout_page_style == 'Left Sidebar') {
  22.  
  23. echo '<br class="appear"><br class="appear">';
  24. get_sidebar($sidebar_name);
  25.  
  26. wp_reset_query();
  27. }
  28.  
  29. if($type_name == 'portfolio') {
  30.  
  31. // get menu item id
  32. global $wpdb;
  33. $post_id = $wpdb->get_var( 'SELECT ID FROM '.$wpdb->posts.' WHERE post_name="'.$project_details_current_page.'" AND post_type="page" AND post_status="publish"' );
  34. $post_title = $wpdb->get_var( 'SELECT post_id FROM '.$wpdb->postmeta.' WHERE meta_key="_menu_item_object_id" AND meta_value="'.$post_id.'"' );
  35.  
  36. ?>
  37.  
  38. <script>
  39. jQuery(document).ready(function($) {
  40. $("#menu-item-<?php echo $post_title; ?>").addClass("current-menu-item");
  41. });
  42. </script>
  43. <?php
  44.  
  45. $post_meta_data = get_post_custom($post->ID); // Get All of the Data at Once
  46.  
  47. if(isset($post_meta_data['custom_repeatable'])) {$custom_repeatable = unserialize($post_meta_data['custom_repeatable'][0]);} //Job Description
  48. if(isset($post_meta_data['custom_project_format'])) {$project_format = $post_meta_data['custom_project_format'][0];} // Project Format
  49. if(isset($post_meta_data['custom_video'])) {$video_url = $post_meta_data['custom_video'][0]; } // Video URL
  50. if(isset($post_meta_data['custom_online_link'])) { $project_online_link = $post_meta_data['custom_online_link'][0]; } // Project Online Link
  51. if(isset($post_meta_data['custom_project_style'])) { $project_details_style = $post_meta_data['custom_project_style'][0];} // Project Details Style
  52. if(isset($post_meta_data['custom_use_online_link_images'])) { $use_online_link_images = $post_meta_data['custom_use_online_link_images'][0];} // Use Online Link On Project Details Images
  53. if(isset($post_meta_data['custom_top_project_widget'])) { $top_project_widget = $post_meta_data['custom_top_project_widget'][0];} // top widget for project details
  54. if(isset($post_meta_data['custom_down_project_widget'])) { $down_project_widget = $post_meta_data['custom_down_project_widget'][0];} // down widget for project details
  55.  
  56. // get custom_repeatable for portfolio
  57. $post_meta_data2 = get_post_meta( $post->ID, 'images', true );
  58.  
  59. // get post thumbnail
  60. if (has_post_thumbnail( $post->ID ) ):
  61. $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );
  62. $feautured_image = $image[0];
  63. endif;
  64.  
  65.  
  66. // check for Project Format
  67. if($project_format == 'image') {
  68.  
  69. $project_type = '
  70. <div class="flex-container">
  71. <div class="flexslider2">
  72. <ul class="slides">';
  73.  
  74. if($post_meta_data2) {
  75. foreach ( (array) $post_meta_data2 as $meta) {
  76. if(empty($meta['image'])){ if(isset($feautured_image)) { $meta['image'] = $feautured_image ; } }
  77.  
  78. if($use_online_link_images == 'no') {
  79.  
  80. $link_caption_images = '
  81. <div class="caption">
  82. <a href="'.$meta['image'].'" rel="prettyPhoto[gallery1]"><img src="'.$meta['image'].'" >
  83. <span class="hover-effect big zoom"></span></a>
  84. </div><!-- hover effect -->
  85. ';
  86.  
  87. } else {
  88. if(!empty($project_online_link)) {
  89. if(isset($project_online_link)) {$href_project_online_link = $project_online_link;}
  90. }
  91. $link_caption_images = '
  92. <div class="caption">
  93. <a href="'.$href_project_online_link.'" target="_blank"><img src="'.$meta['image'].'" >
  94. <span class="hover-effect big link"></span></a>
  95. </div><!-- hover effect -->
  96. ';
  97. }
  98.  
  99. $project_type .= '<li>'.$link_caption_images.'</li>';
  100. }
  101. }
  102.  
  103. $project_type .='
  104. </ul>
  105. </div>
  106. </div>
  107. ';
  108. }
  109. else {
  110.  
  111. if(isset($video_url)) {$string = $video_url; } else { $string = ''; }
  112. if ( strpos($string, 'youtube') !== false )
  113. {
  114. $embed_code = str_replace('watch?v=', 'embed/', $video_url);
  115. // youtube video
  116. $video_file = '
  117. <div class="video-wrap widescreen">
  118. <iframe src="'.$embed_code.'?showinfo=1" frameborder="0" allowfullscreen frameborder="0" ></iframe>
  119. </div><!-- End youtube video wrap -->
  120. ';
  121. }
  122. elseif ( strpos($string, 'vimeo') !== false )
  123. {
  124. $embed_code = str_replace('vimeo.com/', 'player.vimeo.com/video/', $video_url);
  125. // vimeo video
  126. $video_file = '
  127. <div class="video-wrap widescreen vimeo">
  128. <iframe src="'.$embed_code.'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
  129. </div><!-- End vimeo video wrap -->
  130. ';
  131. }
  132. else {
  133. if(isset($feautured_image)) { $feautured_image = $feautured_image;} else {$feautured_image = '';}
  134.  
  135. if($use_online_link_images == 'no') {
  136.  
  137. $link_caption_images = '
  138. <div class="caption">
  139. <a href="'.$feautured_image.'" rel="prettyPhoto[gallery1]"><img src="'.$feautured_image.'">
  140. <span class="hover-effect big zoom"></span></a>
  141. </div><!-- hover effect -->
  142. ';
  143.  
  144. } else {
  145. if(!empty($project_online_link)) {
  146. if(isset($project_online_link)) {$href_project_online_link = $project_online_link;}
  147. }
  148. $link_caption_images = '
  149. <div class="caption">
  150. <a href="'.$href_project_online_link.'" target="_blank"><img src="'.$feautured_image.'">
  151. <span class="hover-effect big link"></span></a>
  152. </div><!-- hover effect -->
  153. ';
  154. }
  155.  
  156. // image type
  157. $video_file = $link_caption_images;
  158.  
  159. }
  160.  
  161. $project_type = '
  162. <div class="image-post bottom-2">
  163. '.$video_file.'
  164. </div><!-- End video image-post -->
  165. ';
  166.  
  167. }
  168.  
  169.  
  170. ?>
  171.  
  172. <div class="sixteen columns">
  173. <h2 class="title big"><?php wp_title('', true, 'right'); ?>
  174.  
  175. <!-- Next Porjects -->
  176. <?php
  177. $next_post = get_next_post();
  178. if (!empty( $next_post )): ?>
  179. <a href="<?php echo get_permalink( $next_post->ID ); ?>" data="<?php echo $next_post->post_title; ?>" class="next-project">
  180. </a>
  181. <?php endif;
  182. if (empty( $next_post )): ?>
  183. <a class="next-project disabled"></a>
  184. <?php endif; ?>
  185.  
  186. <!-- Previous Porjects -->
  187. <?php
  188. $prev_post = get_previous_post();
  189. if (!empty( $prev_post )): ?>
  190. <a href="<?php echo get_permalink( $prev_post->ID ); ?>" data="<?php echo $prev_post->post_title; ?>" class="prev-project">
  191. </a>
  192. <?php endif;
  193. if (empty( $prev_post )): ?>
  194. <a class="prev-project disabled"></a>
  195. <?php endif; ?>
  196.  
  197. <span class="line"></span></h2>
  198. </div><!-- Project Title -->
  199.  
  200. <?php if($show_project_details_top_widget == 1 && !empty($project_details_top_widget)) { echo do_shortcode( stripslashes( $project_details_top_widget ) ); }?>
  201.  
  202. <?php if($project_details_style == 'style1') { ?>
  203.  
  204. <?php if( !empty($meta['image']) || !empty($feautured_image) || !empty($video_url) ){ ?>
  205. <!-- Start Project Slider -->
  206. <div class="twelve columns top bottom-2">
  207.  
  208. <?php if(isset($top_project_widget)) { if(!empty($top_project_widget)) { echo do_shortcode($top_project_widget).'<br class="appear" />'; } } ?>
  209.  
  210. <div class="slider-project">
  211.  
  212. <?php echo $project_type; ?>
  213.  
  214. </div><!-- End slider-project -->
  215.  
  216. <?php if(isset($down_project_widget)) { if(!empty($down_project_widget)) { echo '<br class="appear" />'.do_shortcode($down_project_widget); } } ?>
  217.  
  218. </div>
  219. <!-- End -->
  220. <?php } ?>
  221.  
  222. <!-- Start Project Details -->
  223. <div class="four columns bottom">
  224.  
  225. <h2 class="title small top-5 bottom-2"><?php _e("Listen & Download", "jozoorthemes"); ?> <span class="line"></span></h2>
  226.  
  227. <div class="about-project bottom">
  228. <?php the_content(); ?>
  229. </div>
  230.  
  231. <div class="clearfix"></div>
  232.  
  233. <?php if(!empty($custom_repeatable) && !empty($custom_repeatable[0])) { ?>
  234. <h2 class="title small bottom-2"><?php _e("Track Details", "jozoorthemes"); ?> <span class="line"></span></h2>
  235.  
  236. <ul class="square-list job bottom-2">
  237. <?php foreach ($custom_repeatable as $stringrepeatable) { echo '<li><a>'.$stringrepeatable.'</a></li>'; } ?>
  238. </ul><!-- End square-list -->
  239. <?php } ?>
  240.  
  241. <?php if(!empty($project_online_link)) { ?>
  242. <a href="<?php if(isset($project_online_link)) {echo $project_online_link;} ?>" target="_blank" class="button medium color"><?php _e("Download", "jozoorthemes"); ?></a>
  243. <?php } ?>
  244.  
  245.  
  246. </div>
  247. <!-- End Project Details -->
  248.  
  249. <?php }
  250. elseif ($project_details_style == 'style2') {?>
  251.  
  252. <?php if( !empty($meta['image']) || !empty($feautured_image) || !empty($video_url) ){ ?>
  253. <!-- Start Project Slider -->
  254. <div class="sixteen columns top bottom-2">
  255.  
  256. <?php if(isset($top_project_widget)) { if(!empty($top_project_widget)) { echo do_shortcode($top_project_widget).'<br class="appear" />'; } } ?>
  257.  
  258. <div class="slider-project">
  259.  
  260. <?php echo $project_type; ?>
  261.  
  262. </div><!-- End slider-project -->
  263.  
  264. <?php if(isset($down_project_widget)) { if(!empty($down_project_widget)) { echo '<br class="appear" />'.do_shortcode($down_project_widget); } } ?>
  265.  
  266. </div>
  267. <!-- End -->
  268. <?php } ?>
  269.  
  270. <div class="clearfix"></div>
  271.  
  272. <!-- Start Project Details -->
  273. <div class="<?php if(empty($custom_repeatable[0]) && empty($project_online_link)) { ?> sixteen columns <?php } else { ?>twelve columns <?php } ?> bottom">
  274.  
  275. <h2 class="title small"><?php _e("Listen & Download", "jozoorthemes"); ?> <span class="line"></span></h2>
  276.  
  277. <div class="about-project bottom">
  278. <?php the_content(); ?>
  279. </div>
  280.  
  281. </div>
  282. <!-- End Project Details -->
  283.  
  284. <div class="four columns bottom">
  285.  
  286. <?php if(!empty($custom_repeatable) && !empty($custom_repeatable[0])) { ?>
  287. <h2 class="title small"><?php _e("Track Details", "jozoorthemes"); ?> <span class="line"></span></h2>
  288.  
  289. <ul class="square-list job bottom-2">
  290. <?php foreach ($custom_repeatable as $stringrepeatable) { echo '<li><a>'.$stringrepeatable.'</a></li>'; } ?>
  291. </ul><!-- End square-list -->
  292. <?php } ?>
  293.  
  294. <?php if(!empty($project_online_link)) { ?>
  295. <a href="<?php if(isset($project_online_link)) {echo $project_online_link;} ?>" class="button medium color"><?php _e("Download", "jozoorthemes"); ?></a>
  296. <?php } ?>
  297. </div>
  298. <!-- End -->
  299.  
  300. <?php } ?>
  301.  
  302.  
  303. <?php if($show_project_details_down_widget == 1 && !empty($project_details_down_widget)) { echo do_shortcode( stripslashes( $project_details_down_widget ) ); }?>
  304.  
  305. <div class="clearfix"></div>
  306.  
  307.  
  308. <!-- Start Related Projects -->
  309.  
  310. <?php if($project_details_style1 == 1) { ?>
  311.  
  312. <?php
  313.  
  314. //Get array of terms
  315. $terms = get_the_terms( $post->ID , 'project-type', 'string');
  316. //Pluck out the IDs to get an array of IDS
  317.  
  318. if($terms) {
  319.  
  320. $term_ids = array_values( wp_list_pluck($terms,'term_id') );
  321.  
  322. //Query posts with tax_query. Choose in 'IN' if want to query posts with any of the terms
  323. //Chose 'AND' if you want to query for posts with all terms
  324. $second_query = new WP_Query( array(
  325. 'post_type' => 'portfolio',
  326. 'tax_query' => array(
  327. array(
  328. 'taxonomy' => 'project-type',
  329. 'field' => 'id',
  330. 'terms' => $term_ids,
  331. 'operator'=> 'IN' //Or 'AND' or 'NOT IN'
  332. )),
  333. 'posts_per_page' => 4,
  334. 'ignore_sticky_posts' => 1,
  335. 'orderby' => 'rand',
  336. 'post__not_in'=>array($post->ID)
  337. ) );
  338.  
  339.  
  340. if($second_query->have_posts()) {
  341. ?>
  342.  
  343. <div class="recent-work clearfix">
  344.  
  345. <div class="slidewrap" >
  346.  
  347. <div class="sixteen columns"> <h2 class="title small"><?php _e("Related Projects", "jozoorthemes"); ?> <span class="line"></span></h2> </div>
  348.  
  349. <ul class="slider" id="sliderName">
  350.  
  351. <li class="slide">
  352. <?php
  353. while ($second_query->have_posts() ) : $second_query->the_post();
  354. $post_meta_data = get_post_custom($post->ID); // Get All of the Data at Once
  355.  
  356. if(isset($post_meta_data['custom_slideshow_link'])) {$slideshow_link = $post_meta_data['custom_slideshow_link'][0];} // Slideshow Link
  357. if(isset($post_meta_data['custom_project_format'])) {$project_format = $post_meta_data['custom_project_format'][0];} // Project Format
  358. if(isset($post_meta_data['custom_video'])) {$video_url = $post_meta_data['custom_video'][0];} // Video URL
  359.  
  360. // get post thumbnail
  361. if (has_post_thumbnail( $post->ID ) ):
  362. $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );
  363. $feautured_image = $image[0];
  364. endif;
  365.  
  366. // check for Slideshow Link
  367. if($slideshow_link == 'yes') {
  368.  
  369. // check for Project Format
  370. if($project_format == 'image') {
  371. $hover_class = 'zoom';
  372. $project_link = '<a href="'.$feautured_image.'" rel="prettyPhoto[]">' ;
  373. }
  374. else {
  375. if(empty($video_url)){ $video_url = $feautured_image ;}
  376. $hover_class = 'video';
  377. $project_link = '<a href="'.$video_url.'" rel="prettyPhoto[]">' ;
  378. }
  379.  
  380. }
  381. else {
  382. $hover_class = 'link';
  383. $direct_link = get_permalink();
  384. $project_link = '<a href="'.$direct_link.'">' ;
  385. }
  386.  
  387. ?>
  388. <div class="four columns item">
  389. <div class="caption">
  390. <?php echo $project_link; ?>
  391. <img src="<?php if(isset($feautured_image)) { echo $feautured_image; } ?>" alt="" class="pic column-4" />
  392. <span class="hover-effect <?php echo $hover_class; ?>"></span></a>
  393. </div><!-- hover effect -->
  394. <h4><a href="<?php echo get_permalink(); ?>"><?php the_title(); ?></a></h4>
  395. <p>
  396. <?php
  397. $terms = get_the_terms( $post->ID, 'project-type' );
  398. if ( $terms && ! is_wp_error( $terms ) ) :
  399. $draught_links = array();
  400. foreach ( $terms as $term ) {
  401. $draught_links[] = $term->name;
  402. }
  403. echo $on_draught = join( ", ", $draught_links );
  404. endif;
  405. ?>
  406. </p>
  407. </div>
  408.  
  409. <?php endwhile;
  410. wp_reset_query();
  411. ?>
  412.  
  413. </li><!-- End slide -->
  414.  
  415. </ul>
  416.  
  417. </div><!-- End slidewrap -->
  418.  
  419. </div><!-- End Related Projects -->
  420.  
  421.  
  422. <?php
  423.  
  424. }
  425. else { echo '<br class="appear">';}
  426.  
  427.  
  428.  
  429. }
  430.  
  431.  
  432.  
  433. }
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442. ?>
  443.  
  444. <?php
  445.  
  446. }
  447.  
  448. elseif($type_name == 'post') {
  449.  
  450. // set post views
  451. setPostViews(get_the_ID());
  452.  
  453. // get menu item id
  454. global $wpdb;
  455. $post_id = $wpdb->get_var( 'SELECT ID FROM '.$wpdb->posts.' WHERE post_name="'.$single_post_current_page.'" AND post_type="page" AND post_status="publish"' );
  456. $post_title = $wpdb->get_var( 'SELECT post_id FROM '.$wpdb->postmeta.' WHERE meta_key="_menu_item_object_id" AND meta_value="'.$post_id.'"' );
  457.  
  458.  
  459. ?>
  460.  
  461. <script>
  462. jQuery(document).ready(function($) {
  463. $("#menu-item-<?php echo $post_title; ?>").addClass("current-menu-item");
  464. });
  465. </script>
  466.  
  467.  
  468. <!-- Start Single Post -->
  469.  
  470. <?php if($single_layout_page_style == 'Full Width') { echo '<div class="sixteen columns top bottom">'; } else { ?>
  471. <div class="eleven columns top bottom">
  472. <?php } ?>
  473.  
  474. <!-- ==================== Single Post ==================== -->
  475. <div class="post gallery bottom">
  476.  
  477. <?php if($single_layout_page_style == 'Left Sidebar') { echo ''; } else { ?>
  478. <br class="appear"><br class="appear"><br class="appear">
  479. <?php } ?>
  480.  
  481. <h2 class="title big top-2 bottom-2"><?php the_title(); ?> <span class="line"></span></h2>
  482. <!-- Title Post -->
  483.  
  484. <div class="post-meta bottom-2 transparent">
  485. <div class="meta"><span class="history icon gray"></span> <?php _e("On", "jozoorthemes"); ?> <?php the_time('d M, Y'); ?> </div><!-- Date -->
  486. <div class="meta"><span class="more-items icon gray"></span>
  487. <?php
  488. $categories = get_the_category();
  489. $separator = ', ';
  490. $output = '';
  491. if($categories){
  492. foreach($categories as $category) {
  493. $output .= '<a href="'.get_category_link($category->term_id ).'" data="' . esc_attr( sprintf( __( "View all posts in %s", "jozoorthemes" ), $category->name ) ) . '">'.$category->cat_name.'</a>'.$separator;
  494. }
  495. echo trim($output, $separator);
  496. }
  497. ?>
  498. </div><!-- Category -->
  499. <div class="meta"><span class="user icon gray"></span> <?php _e("By : ", "jozoorthemes"); ?> <?php the_author(); ?> </div><!-- Author -->
  500. <div class="meta"><span class="conversation icon gray"></span> <?php comments_number( __("No Comments", "jozoorthemes") , __("With 1 Comment", "jozoorthemes"), __("With % Comments", "jozoorthemes") ); ?> </div><!-- Comments -->
  501. <div class="meta"><span class="eye_open icon gray"></span> <?php _e("Views :", "jozoorthemes"); ?> <?php echo getPostViews(get_the_ID()); ?> </div><!-- Views -->
  502. </div><!-- End post-meta -->
  503.  
  504. <!-- Start top post content widget -->
  505. <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('Top Post')) { } else { } ?>
  506. <!-- End widget -->
  507.  
  508. <?php
  509.  
  510. $post_meta_data = get_post_custom($post->ID); // Get All of the Data at Once
  511.  
  512. if(isset($post_meta_data['customposts_post_format'])) {$post_format = $post_meta_data['customposts_post_format'][0];} else { $post_format = 'image';} // Project Format
  513. if(isset($post_meta_data['customposts_post_video'])) {$video_url = $post_meta_data['customposts_post_video'][0];} else { $video_url = '';} // Video URL
  514. if(isset($post_meta_data['customposts_post_soundcloud'])) {$soundcloud_code = $post_meta_data['customposts_post_soundcloud'][0];} else { $soundcloud_code = '';} // SoundCloud Url
  515.  
  516. // get custom_repeatable for portfolio
  517. $post_meta_data2 = get_post_meta( $post->ID, 'images', true );
  518.  
  519. // get post thumbnail
  520. if (has_post_thumbnail( $post->ID ) ):
  521. $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );
  522. $feautured_image = $image[0];
  523. endif;
  524.  
  525. $permalink_post = get_permalink(); //permalink
  526. //$post_title_alt = the_title(); // post title
  527.  
  528. // check for Post Format
  529. if($post_format == 'slider') {
  530.  
  531. if(empty($post_meta_data2) && empty($feautured_image) ){
  532. $postformat = '';
  533. }
  534. else {
  535.  
  536. $postformat = '
  537. <div class="image-post bottom">
  538.  
  539. <div class="flex-container">
  540. <div class="flexslider3">
  541. <ul class="slides">';
  542.  
  543. foreach ( (array) $post_meta_data2 as $meta) {
  544. if(empty($meta['image'])){ $meta['image'] = $feautured_image ;}
  545. $postformat .= '<li><img src="'.$meta['image'].'" ></li>';
  546. }
  547.  
  548.  
  549. $postformat .= '
  550. </ul>
  551. </div>
  552. </div>
  553.  
  554. </div><!-- End slider image-post -->
  555. ';
  556.  
  557. }
  558. }
  559. elseif($post_format == 'video') {
  560.  
  561. if(empty($video_url) && empty($feautured_image) ){
  562. $postformat = '';
  563. }
  564. else {
  565.  
  566. if(isset($video_url)) {$string = $video_url; } else { $string = ''; }
  567. if ( strpos($string, 'youtube') !== false )
  568. {
  569. // youtube video
  570. $video_file = '
  571. <div class="video-wrap widescreen">
  572. <iframe src="'.$video_url.'?showinfo=1" frameborder="0" allowfullscreen frameborder="0" ></iframe>
  573. </div><!-- End youtube video wrap -->
  574. ';
  575. }
  576. elseif ( strpos($string, 'vimeo') !== false )
  577. {
  578. // vimeo video
  579. $video_file = '
  580. <div class="video-wrap widescreen vimeo">
  581. <iframe src="'.$video_url.'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
  582. </div><!-- End vimeo video wrap -->
  583. ';
  584. }
  585. else {
  586. if(isset($feautured_image)) { $feautured_image = $feautured_image; } else { $feautured_image = '';}
  587. // image type
  588. $video_file = '
  589. <img src="'.$feautured_image.'">
  590. ';
  591.  
  592. }
  593.  
  594. $postformat = '
  595. <div class="image-post bottom">
  596. '.$video_file.'
  597. </div><!-- End video image-post -->
  598. ';
  599.  
  600. }
  601. }
  602. elseif($post_format == 'soundcloud') {
  603.  
  604. if(empty($soundcloud_code) && empty($feautured_image) ){
  605. $postformat = '';
  606. }
  607. else {
  608.  
  609. if(!empty($soundcloud_code)) {
  610. $soundcloud_final = $soundcloud_code;
  611. }
  612. else {
  613. if(isset($feautured_image)) { $feautured_image = $feautured_image; } else { $feautured_image = '';}
  614.  
  615. // image type
  616. $soundcloud_final = '
  617. <a href="'.$permalink_post.'"><img src="'.$feautured_image.'"></a>
  618. ';
  619. }
  620.  
  621. $postformat = '
  622. <div class="image-post bottom-2">
  623. '.$soundcloud_final.'
  624. </div><!-- End video image-post -->
  625. ';
  626.  
  627. }
  628. }
  629. elseif($post_format == 'image') {
  630.  
  631. if(empty($feautured_image) ){
  632. $postformat = '';
  633. }
  634. else {
  635.  
  636. $postformat = '
  637. <div class="image-post bottom">
  638. <img src="'.$feautured_image.'">
  639. </div><!-- End single image image-post -->
  640. ';
  641.  
  642. }
  643.  
  644. }
  645.  
  646.  
  647. ?>
  648.  
  649. <?php echo $postformat; ?>
  650.  
  651. <div class="post-content bottom">
  652.  
  653. <?php the_content(); ?>
  654.  
  655. <br class="appear">
  656.  
  657. <?php edit_post_link('[ <span class="color">'.__("Edit This Post", "jozoorthemes").'</span> ]','',''); ?>
  658.  
  659. </div><!-- End post-content -->
  660.  
  661. <!-- Start down post content widget -->
  662. <?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('Down Post')) { } else { } ?>
  663. <!-- End widget -->
  664.  
  665. <hr class="bottom-2"/>
  666.  
  667. <?php if( has_tag() ) { ?>
  668.  
  669. <?php if($show_tags == 1) { ?>
  670.  
  671. <div class="popular-tags small top bottom-2">
  672. <span class="tags icon gray"></span> <?php _e("Tags :", "jozoorthemes"); ?> &nbsp;
  673. <?php the_tags('', '', ''); ?>
  674. </div><!-- End tags -->
  675.  
  676. <hr class="bottom-2"/>
  677.  
  678. <?php } } ?>
  679.  
  680. <?php if($show_prevnext_post == 1) { ?>
  681.  
  682. <div class="top bottom">
  683.  
  684. <!-- Previous Porjects -->
  685. <?php
  686. $prev_post = get_previous_post();
  687. if (!empty( $prev_post )): ?>
  688. <a href="<?php echo get_permalink( $prev_post->ID ); ?>" data="<?php echo $prev_post->post_title; ?>" class="prev-post">
  689. <span class="left_arrow icon gray"></span> <?php _e("Previous Post", "jozoorthemes"); ?></a>
  690. <?php endif; ?>
  691.  
  692. <!-- Next Porjects -->
  693. <?php
  694. $next_post = get_next_post();
  695. if (!empty( $next_post )): ?>
  696. <a href="<?php echo get_permalink( $next_post->ID ); ?>" data="<?php echo $next_post->post_title; ?>" class="next-post">
  697. <?php _e("Next Post", "jozoorthemes"); ?>&nbsp; <span class="right_arrow icon gray"></span></a>
  698. <?php endif; ?>
  699.  
  700.  
  701. </div><!-- End next-prev post -->
  702.  
  703. <?php } ?>
  704.  
  705. <?php if($show_author_box == 1) { global $id_or_email; ?>
  706.  
  707. <br class="appear">
  708.  
  709. <h4 class="title"><?php _e("About The Author", "jozoorthemes"); ?><span class="line"></span></h4>
  710.  
  711. <div class="info-box">
  712. <!-- <img src="images/img/team/author.jpg" alt="" class="pic-2" /> -->
  713. <?php echo get_avatar( get_the_author_meta('ID'), $size = '80', $default = '' ); ?>
  714. <h5><span class="color"><?php the_author_link(); ?></span> </h5>
  715. <p><?php the_author_meta('description'); ?> </p>
  716. <hr class="top-3 bottom-2" />
  717. <?php _e("Number of Posts :", "jozoorthemes"); ?> <span class="color"><?php echo get_the_author_posts(); ?></span>
  718. <div class="right">
  719. <a href="<?php echo get_author_posts_url(get_the_author_meta( 'ID' )); ?>"><?php _e("All Posts by :", "jozoorthemes"); ?> <?php the_author_meta('display_name'); ?></a>
  720. </div>
  721. </div>
  722.  
  723. <?php } ?>
  724.  
  725. <?php if($show_related_posts == 1) { ?>
  726.  
  727. <!-- Start Related Projects -->
  728.  
  729. <?php
  730. $orig_post = $post;
  731. $tags = wp_get_post_tags($post->ID);
  732.  
  733. if ($tags) {
  734. $tag_ids = array();
  735. foreach($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
  736. $args=array(
  737. 'tag__in' => $tag_ids,
  738. 'post__not_in' => array($post->ID),
  739. 'post_type' => 'post',
  740. 'posts_per_page'=>4, // Number of related posts to display.
  741. 'orderby' => 'rand',
  742. 'ignore_sticky_posts'=>1
  743. );
  744.  
  745. $my_query = new wp_query( $args );
  746. if( $my_query->have_posts() ) {
  747. ?>
  748.  
  749. <h4 class="title"><?php _e("Related Posts", "jozoorthemes"); ?><span class="line"></span></h4>
  750.  
  751. <ul class="most-posts">
  752.  
  753. <?php
  754. while( $my_query->have_posts() ) {
  755. $my_query->the_post();
  756.  
  757. // get post thumbnail
  758. if (has_post_thumbnail( $post->ID ) ):
  759. $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );
  760. $feautured_image = $image[0];
  761. endif;
  762. ?>
  763.  
  764. <li class="one-third column alpha omega">
  765. <?php if (has_post_thumbnail( $post->ID ) ) {?>
  766. <a href="<?php echo get_permalink(); ?>"><img src="<?php if(isset($feautured_image)) { echo $feautured_image; } ?>" alt="" class="pic-2" /></a>
  767. <?php } else { echo ''; } ?>
  768. <p><a href="<?php echo get_permalink(); ?>"><?php the_title(); ?></a></p>
  769. </li>
  770.  
  771. <?php }
  772. ?>
  773. </ul><!-- End square-list -->
  774.  
  775. <?php
  776. }
  777.  
  778. }
  779. $post = $orig_post;
  780. wp_reset_query();
  781. ?>
  782.  
  783. <!-- End Related Projects -->
  784.  
  785. <?php } ?>
  786.  
  787.  
  788. <div class="clearfix"></div>
  789.  
  790.  
  791. <?php comments_template(); ?>
  792.  
  793.  
  794. </div>
  795. <!-- ==================== End single post ==================== -->
  796.  
  797.  
  798. </div><!-- End column -->
  799.  
  800. <?php
  801. }
  802.  
  803. ?>
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811. <?php endwhile; endif; ?>
  812.  
  813. <?php
  814. if(get_post_type( $post->ID ) == 'post' && $single_layout_page_style == 'Right Sidebar') {
  815.  
  816. echo '<br class="appear"><br class="appear"><br class="appear">';
  817. get_sidebar($sidebar_name);
  818.  
  819. }
  820.  
  821. if(get_post_type( $post->ID ) == 'post' && $single_layout_page_style == 'Full Width') {
  822.  
  823. echo '';
  824.  
  825. }
  826. ?>
  827.  
  828. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement