Guest User

Untitled

a guest
Jun 21st, 2018
20
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.  
  36. <div class="row">
  37. <div id="portfolio-carouse1l" class="owl-carousel11 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 col-md-6">
  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. <div class="thumbnail-showcase-overlay">
  77. <div class="thumbnail-showcase-icons">
  78. <?php if(isset($post_thumbnail_url)){ ?>
  79. <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>
  80. <?php } ?>
  81. <?php if(!empty($portfolio_link)) {?>
  82. <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>
  83. <?php } ?>
  84. </div>
  85. </div>
  86. </figure>
  87. <header class="entry-header">
  88. <h4 class="entry-title"><?php if(!empty($portfolio_link)) {?>
  89. <a href="<?php echo $portfolio_link;?>" <?php if(!empty($portfolio_target)){ echo 'target="_blank"'; } ?> class="hover_thumb"><?php the_title(); ?></a>
  90. <?php } else the_title(); ?>
  91. </h4>
  92. </header>
  93. <?php if(get_post_meta( get_the_ID(),'portfolio_title_description', true ))
  94. { ?>
  95. <div class="entry-content">
  96. <p><?php echo get_post_meta( get_the_ID(),'portfolio_title_description', true ); ?></p>
  97. </div>
  98. <?php } ?>
  99. </article>
  100. </div>
  101. <?php $j++; endwhile; } ?>
  102. </div>
  103. </div>
  104.  
  105. <!-- /Item Scroll -->
  106. </div>
  107. </section>
  108. <!-- /Portfolio Section -->
  109. <?php } ?>
  110. <?php spicepress_after_portfolio_section_trigger(); ?>
RAW Paste Data