Advertisement
Uranbold

single-portfolio.php

May 22nd, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.88 KB | None | 0 0
  1. <?php get_header(); ?>
  2. <?php the_post(); ?>
  3. <article id="post-<?php the_ID(); ?>" <?php post_class('single-portfolio');?>><?php
  4. if(post_password_required()){
  5. the_content();
  6. }else{ ?>
  7. <div class="row">
  8. <div class="span8">
  9. <?php
  10. global $post;
  11.  
  12. $likeit = get_post_meta($post->ID, 'post_likeit', true);
  13. $likecount = empty($likeit) ? '0' : $likeit;
  14. $likedclass = 'likeit';
  15. if (isset($_COOKIE['likeit-' . $post->ID])) {
  16. $likedclass .= ' liked';
  17. }
  18.  
  19. $ids = get_metabox('gallery_image_ids');
  20. $video_embed = get_metabox('format_video_embed');
  21. if($ids!="false" && $ids!="") {
  22. $height = get_metabox('format_image_height');
  23. portfolio_gallery(770, $height, $ids, false);
  24. } elseif(!empty($video_embed)) {
  25. echo apply_filters("the_content", htmlspecialchars_decode($video_embed));
  26. } else {
  27. $height = get_metabox('image_height');
  28. portfolio_image(770, $height,false);
  29. }
  30.  
  31. if (tw_option('portfolio_share')) {
  32. echo tw_social_share();
  33. }
  34. ?>
  35. <?php
  36. $project_desc = tw_option('translate_projectdesc') ? tw_option('translate_projectdesc') : __('Project Description', 'flatco');
  37. $live_preview = tw_option('translate_livepreview') ? tw_option('translate_livepreview') : __('LIVE PREVIEW', 'flatco');
  38. echo do_shortcode('[tw_item_title title="'.$project_desc.'"]');
  39. the_content();
  40.  
  41. echo get_the_term_list( $post->ID, 'cat_portfolio', '<div class="meta-cat"><i class="fa fa-tags"></i>', ', ', '</div>' );
  42. if(!tw_option('hide_favorites')){ ?>
  43. <div class="meta-fav">
  44. <div data-ajaxurl="<?php echo home_url();?>" data-pid="<?php echo $post->ID;?>" class="<?php echo $likedclass;?>">
  45. <i class="fa fa-heart"></i><span><?php echo $likecount;?></span>
  46. </div>
  47. <span><?php _e('Favorites');?></span>
  48. </div><?php
  49. }
  50. if (get_metabox("preview_url") != "") {?>
  51. <a href="<?php echo get_metabox("preview_url"); ?>" target="_blank" class="btn btn-border live-preview"><?php echo $live_preview; ?><span></span></a>
  52. <?php } ?>
  53. </div>
  54. <div class="span4">
  55. <?php get_sidebar(); ?>
  56. </div>
  57. </div><?php
  58. } ?>
  59. </article>
  60.  
  61. <?php
  62. if(!tw_option('port_related')) {
  63. related_portfolios();
  64. }?>
  65.  
  66. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement