Guest User

Untitled

a guest
Jul 31st, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.12 KB | None | 0 0
  1. <?php
  2. $appointment_options=theme_setup_data();
  3. $project_setting = wp_parse_args( get_option( 'appointment_options', array() ), $appointment_options );
  4. if($project_setting['portfolio_section_enabled'] == 0) { ?>
  5. <!-- Portfolio Section -->
  6. <div class="portfolio-section">
  7.  
  8. <div class="container">
  9. <!-- Section Title -->
  10. <div class="row">
  11. <div class="col-md-12">
  12. <div class="section-heading-title">
  13.  
  14. <h1><?php echo $project_setting['portfolio_title']; ?></h1>
  15. <p class="section-description"><?php echo $project_setting['portfolio_description']; ?></p>
  16.  
  17. </div>
  18. </div>
  19. </div>
  20. <!-- /Section Title -->
  21.  
  22. <div class="col-md-12">
  23. <div class="carousel slide" data-ride="carousel" data-type="multi" data-interval="3000" id="newCarousel">
  24. <div class="carousel-inner">
  25.  
  26. <?php
  27.  
  28.  
  29. $post_type = 'appoint_portfolio';
  30.  
  31. $args = array (
  32. 'post_type' => $post_type,
  33. 'tax_query' => array(
  34. array(
  35. 'taxonomy' => 'portfolio_categories',
  36. 'field' => 'id',
  37. 'terms' => $project_setting['portfolio_selected_category_id'],
  38. //'operator' => 'NOT IN',
  39. ),
  40. ),
  41. 'posts_per_page' => $project_setting['portfolio_list'],
  42. 'post_status' => 'publish');
  43. $j=1;
  44. $portfolio_query = null;
  45. $portfolio_query = new WP_Query($args);
  46. if( $portfolio_query->have_posts() )
  47. {
  48. while ($portfolio_query->have_posts()) : $portfolio_query->the_post();
  49. $project_description =sanitize_text_field( get_post_meta( get_the_ID(), 'project_description', true ));
  50. $project_more_btn_link =sanitize_text_field( get_post_meta( get_the_ID(), 'project_more_btn_link', true ));
  51. $project_link_chkbx = sanitize_text_field( get_post_meta( get_the_ID(), 'project_link_chkbx', true ));
  52.  
  53.  
  54. ?>
  55. <div class="item12 <?php if($j == 1){ echo "active"; $j++; } ?>">
  56. <div class="col-md-4 col-sm-6 col-xs-12 pull-left portfolio-area">
  57. <div class="portfolio-image">
  58. <?php
  59. if(has_post_thumbnail())
  60. {
  61. $class=array('class'=>'img-responsive');
  62. the_post_thumbnail('', $class);
  63. $post_thumbnail_id = get_post_thumbnail_id();
  64. $post_thumbnail_url = wp_get_attachment_url($post_thumbnail_id );
  65. }
  66. ?>
  67. <div class="portfolio-showcase-overlay">
  68. <div class="portfolio-showcase-overlay-inner">
  69. <div class="portfolio-showcase-icons">
  70. <?php if(isset($post_thumbnail_url)){ ?>
  71. <a href="<?php echo $post_thumbnail_url; ?>" data-lightbox="image" title="<?php the_title(); ?>" class="hover_thumb"><i class="fa fa-search"></i></a>
  72. <?php } ?>
  73. <?php if(!empty($project_more_btn_link)) {?>
  74. <a href="<?php echo $project_more_btn_link;?>" <?php if(!empty($project_link_chkbx)){ echo 'target="_blank"'; } ?> title="Appointment" class="hover_thumb"><i class="fa fa-plus"></i></a>
  75. <?php } ?>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. <div class="portfolio-caption">
  81. <h4><?php if(!empty($project_more_btn_link)) {?>
  82. <a href="<?php echo $project_more_btn_link;?>" <?php if(!empty($project_link_chkbx)){ echo 'target="_blank"'; } ?> class="hover_thumb"><?php the_title(); ?></a>
  83. <?php } else the_title(); ?></h4>
  84.  
  85. <?php if(get_post_meta( get_the_ID(),'project_description', true ))
  86. { ?>
  87. <p><?php echo get_post_meta( get_the_ID(),'project_description', true ); ?></p>
  88. <?php } ?>
  89. </div>
  90. </div></div>
  91. <?php $j++; endwhile; } ?>
  92. </div>
  93. <!-- Project Scroll -->
  94. <div class="row">
  95. <?php if($j>3){ ?>
  96. <div class="col-md-12">
  97. <ul class="project-scroll-btn">
  98. <li><a class="project-prev" href="#newCarousel" data-slide="prev"></a></li>
  99. <li><a class="project-next" href="#newCarousel" data-slide="next"></a></li>
  100. </ul>
  101. </div>
  102. <?php } ?>
  103. </div>
  104. <!-- /Project Scroll -->
  105. </div>
  106. </div>
  107. </div></div>
  108. <!-- /Portfolio Section -->
  109. <div class="clearfix"></div>
  110. <?php } ?>
Add Comment
Please, Sign In to add comment