Guest User

Untitled

a guest
Jan 18th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.99 KB | None | 0 0
  1. <div class="container-fluid">
  2. <div class="row">
  3. <!-- <div class="section-head text-center col-sm-12">
  4. <h4>My Work</h4>
  5. <p>...</p>
  6. </div> -->
  7. <?php
  8. $terms = get_terms( array(
  9. 'taxonomy' => 'work-category',
  10. 'hide_empty' => false,
  11. ) );
  12. if($terms){
  13. //var_dump($terms);
  14. ?>
  15. <!-- filter links -->
  16. <div class="filtering text-center mb-30 col-sm-12">
  17. <div class="filter">
  18. <span data-filter='*' class="active">All</span>
  19. <?php foreach ($terms as $key => $value) { ?>
  20. <span data-filter='.<?php echo $value->slug ?>'><?php echo $value->name ?></span>
  21. <?php } ?>
  22. <!-- <span data-filter='.<?php echo $value->slug ?>'><?php echo $value->name ?></span>
  23. <span data-filter='.<?php echo $value->slug ?>'><?php echo $value->name ?></span> -->
  24. </div>
  25. </div>
  26. <?php } ?>
  27.  
  28. <div class="clearfix"></div>
  29.  
  30. <!-- gallery -->
  31. <div class="gallery full-width">
  32.  
  33. <?php $arg = array(
  34. 'post_type' => 'portfolio',
  35. 'posts_per_page' => -1,
  36. 'order' => 'ASC',
  37. );
  38. $the_query1 = new WP_Query($arg); ?>
  39.  
  40. <?php if($the_query1->have_posts()){ ?>
  41. <?php $i = 0; while ($the_query1->have_posts()) { $the_query1->the_post(); $i++;?>
  42. <!-- gallery item -->
  43. <?php if (has_post_thumbnail() ){ ?>
  44. <?php
  45. $ab_param1 = array('width' => 470, 'height' => 320);
  46. $thumb_images1 = get_the_post_thumbnail_url();
  47. $url_img1 = bfi_thumb($thumb_images1, $ab_param1);
  48. ?>
  49. <?php $terms = get_the_terms( $post->ID , array( 'work-category') );
  50. //var_dump($terms);
  51. $cat_app = '';
  52. $cat_name = '';
  53. foreach ($terms as $key => $cat) {
  54. //var_dump($cat);
  55. $cat_app = $cat->slug.' ';
  56. $cat_name = $cat->name.'';
  57. }
  58. //var_dump($cat_app);no-padding
  59. ?>
  60. <div class="col-lg-3 col-md-6 items <?php echo $cat_app ?>">
  61. <div class="item-img">
  62. <img src="<?php echo $url_img1; ?>" alt="image">
  63. <div class="item-img-overlay">
  64. <div class="overlay-info full-width">
  65. <p><?php echo $cat_app ?></p>
  66. <h6><?php the_title(); ?></h6>
  67. <a href="<?php echo get_the_post_thumbnail_url(); ?>" class="popimg">
  68. <span class="icon"><i class="fas fa-search-plus"></i></span>
  69. </a>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. <?php } } } ?>
  75. </div>
  76. </div>
  77. </div>
  78. </section>
Add Comment
Please, Sign In to add comment