Advertisement
Guest User

Untitled

a guest
Apr 29th, 2013
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.87 KB | None | 0 0
  1. <?php
  2. if( ffSimilarPosts::getInstance()->hasSimilarPosts() ) {
  3. ?>
  4. <!-- Featured works
  5. ================================================== -->
  6. <section class="twelve columns remove-left">
  7. <div class="sectionHeader row clearfix">
  8. <div class="sectionHeadingWrap">
  9. <span class="sectionHeading"><?php echo fOpt::Get('translation', 'post-similar-portfolio'); ?></span>
  10. </div>
  11. <div class="carouselNav">
  12. <div class="carouselPrevious"></div>
  13. <div class="carouselNext"></div>
  14. </div>
  15. </div>
  16. <div class="carouselWrapper small">
  17. <ul class="carousel portfolio" data-autoPlay="false">
  18. <!-- Start carousel item portfolio -->
  19. <?php
  20. $currentPost = $post;
  21. foreach( ffSimilarPosts::getInstance()->getSimilarPosts() as $post ) {
  22.  
  23. $simGall = ffGalleryCollection::getGallery( $post->ID );
  24. setup_postdata( $post );
  25.  
  26. if( null == $simGall->getFeaturedImage() ) continue;
  27.  
  28.  
  29. $hoverClass = 'magnify';
  30. $imageLink = $simGall->getFeaturedImage()->image->url;
  31.  
  32. $videoLink = metaBoxManager::getMeta('featured_image_video_link', null, $post->ID);
  33. if( !empty( $videoLink ) ) {
  34. $hoverClass = 'play';
  35. $imageLink = $videoLink;
  36. }
  37.  
  38. echo '<li>';
  39.  
  40. echo '<figure>';
  41. echo '<a class="jackbox" data-group="featured_works" data-thumbTooltip="'; the_title($post->ID); echo '" data-title=">'.$simGall->getFeaturedImage()->title.'" href="'.$imageLink.'">';
  42. echo '<div class="jackbox-hover jackbox-hover-blur jackbox-hover-'.$hoverClass.'"></div>';
  43. echo '<img width="161" height="122" src="'.$simGall->getFeaturedImage()->image->resize(161,120, true).'" alt="" />';
  44. echo '<span class="portfolioImageOver transparent"></span>';
  45. echo '</a>';
  46. echo '</figure>';
  47.  
  48. echo '<article data-targetURL="'.get_permalink($post->ID).'">';
  49. echo '<p>';
  50. the_title($post->ID);
  51. echo '</p>';
  52. echo '<span>'.metaBoxManager::getMeta('portfolio_image_description', null, $post->ID).'</span>';
  53. echo '</article>';
  54. echo '<!-- Sample div used as an items description, will only appear inside JackBox -->';
  55. echo '<div class="jackbox-description" id="description_1">';
  56. echo '<h3>'.$simGall->getFeaturedImage()->title.'</h3>';
  57. echo '</div>';
  58. echo '<span class="carouselArrow"></span>';
  59.  
  60. echo '</li>';
  61. //break;
  62. //var_dump( $onePost );
  63. }
  64. $post = $currentPost;
  65. setup_postdata( $post );
  66. ?>
  67.  
  68. </ul>
  69. <div class="clearfix"></div>
  70. </div>
  71. </section>
  72. <!-- End // Featured works -->
  73. <?php
  74. }
  75.  
  76. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement