Guest User

Untitled

a guest
Jan 23rd, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. *
  2.  
  3. <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12 testimonial_section fd">
  4. <h2>FREQUENTLY ASKED QUESTIONS</h2>
  5. <p class="testimonial_fqs_border"></p>
  6. <?php
  7.  
  8. // The Query
  9. $arg= array(
  10. 'post_type'=>'faqs',
  11. 'post_status'=>'publish',
  12. 'post_per_page'=>6,
  13.  
  14. );
  15. $the_query = new WP_Query( $arg );
  16.  
  17. // The Loop
  18. if ( $the_query->have_posts() ) {
  19. $i=1;
  20. while ( $the_query->have_posts() ) {
  21.  
  22. $the_query->the_post();?>
  23. <div class="card faqs_card">
  24. <div class="card-header faqs_header">
  25. <ul class="card_faqs_ul">
  26. <li class="cards_plus_sign cat_header_holder collapse in" data-toggle="collapse" data-target="#demo<?php echo$i?>"><b>+</b></li>
  27. <li class="card_faqs_heading"><b><?php echo the_title();?></b></li>
  28. </ul>
  29. <!-- <button data-toggle="collapse" data-target="#demo">+</button> --></div>
  30. <div class="card-body cv_group collapse" id="demo<?php echo$i?>">
  31. <?php echo the_content();?>
  32. </div>
  33. </div>
  34.  
  35. <?php $i++;}
  36. /* Restore original Post Data */
  37. wp_reset_postdata();
  38. } else {
  39. // no posts found
  40. }?>
  41.  
  42.  
  43. </div>
  44.  
  45. </div>
  46. </div>
  47. <script type="text/javascript">
  48. $(document).ready(function() {
  49.  
  50. $('.cat_header_holder').click(function() {
  51. $(this).nextUntil('.cat_header_holder').slideToggle('slow');
  52. });
  53.  
  54. });
  55. </script>
Add Comment
Please, Sign In to add comment