Guest User

Untitled

a guest
Jul 4th, 2018
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.82 KB | None | 0 0
  1. <?php spicepress_before_portfolio_section_trigger(); ?>
  2. <?php
  3. $portfolio_section_enable = get_theme_mod('portfolio_section_enable','on');
  4. if($portfolio_section_enable !='off')
  5. {
  6. $portfolio_animation_speed = get_theme_mod('portfolio_animation_speed', 3000);
  7. $projectsettings=array('animationSpeed'=>$portfolio_animation_speed);
  8.  
  9.  
  10. wp_register_script('spicepress-project',get_template_directory_uri().'/js/front-page/project.js',array('jquery'));
  11. wp_localize_script('spicepress-project','portfolio_settings',$projectsettings);
  12. wp_enqueue_script('spicepress-project');
  13.  
  14. ?>
  15. <!-- Portfolio Section -->
  16. <section class="portfolio-section">
  17. <div class="container">
  18. <?php
  19. $home_portfolio_section_title = get_theme_mod('home_portfolio_section_title',__('Our Portfolio','spicepress'));
  20. $home_portfolio_section_discription = get_theme_mod('home_portfolio_section_discription','Sea summo mazim ex, ea errem eleifend definitionem vim. Ut nec hinc dolor possim mei ludus efficiendi ei sea summo mazim ex.');
  21. ?>
  22. <!-- Section Title -->
  23. <div class="row">
  24. <div class="col-md-12">
  25. <div class="section-header">
  26. <h1 class="widget-title wow fadeInUp animated animated" data-wow-duration="500ms" data-wow-delay="0ms"><?php echo $home_portfolio_section_title; ?></h1>
  27. <div class="widget-separator"><span></span></div>
  28. <p class="wow fadeInDown animated"><?php echo $home_portfolio_section_discription; ?></p>
  29. </div>
  30. </div>
  31. </div>
  32. <!-- /Section Title -->
  33.  
  34. <!-- Item Scroll -->
  35. <div class="wow fadeInUp animated row" data-wow-delay="100ms" data-wow-duration="300ms">
  36. <div class="row">
  37. <div id="portfolio-carousel" class="owl-carousel owl-theme col-md-12 horizontal-nav">
  38. <?php
  39. $post_type = 'spicepress_portfolio';
  40.  
  41. $args = array (
  42. 'post_type' => $post_type,
  43. 'tax_query' => array(
  44. array(
  45. 'taxonomy' => 'portfolio_categories',
  46. 'field' => 'id',
  47. 'terms' => get_theme_mod('portfolio_selected_category_id', 2),
  48. //'operator' => 'NOT IN',
  49. ),
  50. ),
  51. //'posts_per_page' => $project_setting['portfolio_list'],
  52. 'post_status' => 'publish');
  53. $j=1;
  54. $portfolio_query = null;
  55. $portfolio_query = new WP_Query($args);
  56. if( $portfolio_query->have_posts() )
  57. {
  58. while ($portfolio_query->have_posts()) : $portfolio_query->the_post();
  59. $portfolio_title_description =sanitize_text_field( get_post_meta( get_the_ID(), 'portfolio_title_description', true ));
  60. $portfolio_link =sanitize_text_field( get_post_meta( get_the_ID(), 'portfolio_link', true ));
  61. $portfolio_target = sanitize_text_field( get_post_meta( get_the_ID(), 'portfolio_target', true ));
  62. ?>
  63.  
  64. <div class="item">
  65. <article class="post">
  66. <figure class="post-thumbnail">
  67. <?php
  68. if(has_post_thumbnail())
  69. {
  70. $class=array('class'=>'img-responsive');
  71. the_post_thumbnail('', $class);
  72. $post_thumbnail_id = get_post_thumbnail_id();
  73. $post_thumbnail_url = wp_get_attachment_url($post_thumbnail_id );
  74. }
  75. ?>
  76.  
  77. <!-- <div class="thumbnail-showcase-overlay">
  78. <div class="thumbnail-showcase-icons">
  79. <?php if(isset($post_thumbnail_url)){ ?>
  80. <a href="<?php echo $post_thumbnail_url; ?>" data-lightbox="image" title="<?php the_title(); ?>" class="hover_thumb"><i class="fa fa-picture-o"></i></a>
  81. <?php } ?>
  82. <?php if(!empty($portfolio_link)) {?>
  83. <a href="<?php echo $portfolio_link;?>" <?php if(!empty($portfolio_target)){ echo 'target="_blank"'; } ?> title="Appointment" class="hover_thumb"><i class="fa fa-link"></i></a>
  84. <?php } ?>
  85. </div>
  86. </div>-->
  87.  
  88. </figure>
  89. <header class="entry-header">
  90. <h4 class="entry-title"><?php if(!empty($portfolio_link)) {?>
  91. <a href="<?php echo $portfolio_link;?>" <?php if(!empty($portfolio_target)){ echo 'target="_blank"'; } ?> class="hover_thumb"><?php the_title(); ?></a>
  92. <?php } else the_title(); ?>
  93. </h4>
  94. </header>
  95. <?php if(get_post_meta( get_the_ID(),'portfolio_title_description', true ))
  96. { ?>
  97. <div class="entry-content">
  98. <p><?php echo get_post_meta( get_the_ID(),'portfolio_title_description', true ); ?></p>
  99. </div>
  100. <?php } ?>
  101. </article>
  102. </div>
  103. <?php $j++; endwhile; } ?>
  104. </div>
  105. </div>
  106. </div>
  107. <!-- /Item Scroll -->
  108. </div>
  109. </section>
  110. <!-- /Portfolio Section -->
  111. <?php } ?>
  112. <?php spicepress_after_portfolio_section_trigger(); ?>
Add Comment
Please, Sign In to add comment