Guest User

Untitled

a guest
Mar 18th, 2018
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.62 KB | None | 0 0
  1. <?php
  2. $appointment_options=theme_setup_data();
  3. $about_setting = wp_parse_args( get_option( 'appointment_options', array() ), $appointment_options );
  4. ?>
  5.  
  6. <div class="team-section">
  7. <div class="container">
  8.  
  9. <!-- Section Title -->
  10. <div class="row">
  11. <div class="col-md-12">
  12. <div class="section-heading-title">
  13. <h1><?php echo $about_setting['about_team_title']; ?></h3>
  14. <p><?php echo $about_setting['about_team_description']; ?></p>
  15.  
  16. </div>
  17. </div>
  18. </div>
  19. <!-- /Section Title -->
  20.  
  21. <!-- Team Area -->
  22. <div class="row"> <!-- id="team_scroll" -->
  23. <?php
  24. $count_posts = wp_count_posts( 'appointment_team')->publish;
  25. $arg = array( 'post_type' => 'appointment_team','posts_per_page' =>$count_posts);
  26. $team = new WP_Query( $arg );
  27. $i=1;
  28. if($team->have_posts())
  29. { while($team->have_posts() ) : $team->the_post();
  30.  
  31. $designation_meta_save = sanitize_text_field( get_post_meta( get_the_ID(), 'designation_meta_save', true ));
  32. $description_meta_save = sanitize_text_field( get_post_meta( get_the_ID(), 'description_meta_save', true ));
  33. $fb_meta_save = sanitize_text_field( get_post_meta( get_the_ID(), 'fb_meta_save', true ));
  34. $fb_meta_save_chkbx = sanitize_text_field( get_post_meta( get_the_ID(), 'fb_meta_save_chkbx', true ));
  35. $lnkd_meta_save = sanitize_text_field( get_post_meta( get_the_ID(), 'lnkd_meta_save', true ));
  36. $lnkd_meta_save_chkbx = sanitize_text_field( get_post_meta( get_the_ID(), 'lnkd_meta_save_chkbx', true ));
  37. $twt_meta_save = sanitize_text_field( get_post_meta( get_the_ID(), 'twt_meta_save', true ));
  38. $twt_meta_save_chkbx = sanitize_text_field( get_post_meta( get_the_ID(), 'twt_meta_save_chkbx', true ));
  39.  
  40. ?>
  41. <div class="col-md-3 team-area">
  42. <?php
  43. $defalt_arg =array('class' => "img-responsive");
  44. if(has_post_thumbnail()){
  45. ?>
  46. <div class="team-image">
  47. <a href="<?php if($fb_meta_save){ echo esc_html($fb_meta_save); } ?>" target="_blank" >
  48. <?php the_post_thumbnail('', $defalt_arg); ?>
  49. </a>
  50. <?php } else { echo '<div class="team-image">'; } ?>
  51.  
  52. <?php
  53. if(has_post_thumbnail()){
  54. ?>
  55. </div> <?php } ?>
  56. <div class="team-caption"><h5><?php if(!empty($designation_meta_save)){
  57. echo $designation_meta_save; } ?></h5><h3><?php the_title(); ?></h3></div>
  58. </div> <?php if(!has_post_thumbnail()) { echo '</div>'; } ?>
  59. <?php if($i%4==0)
  60. { echo "<div class='clearfix'></div>"; }
  61. $i++; endwhile;
  62. } else {
  63. $team_title = array('John Doe', 'Sarah Culan', 'Chao Kang', 'Megan Sheryl');
  64. $team_designation = array(__('FOUNDER','appointment'), __('DESIGNER','appointment'),__('DEVELOPER','appointment'),__('DESIGNER'));
  65. for($i=1 ; $i<=4 ; $i++ )
  66. { ?>
  67.  
  68. <div class="col-md-3 team-area">
  69. <div class="team-image">
  70. <img class="img-responsive" src="<?php echo WEBRITI_TEMPLATE_DIR_URI; ?>/images/team/team<?php echo $i; ?>.jpg">
  71. <div class="team-showcase-overlay">
  72. <div class="team-showcase-overlay-inner">
  73. <div class="team-showcase-icons">
  74. <a href="#" title="Facebook" class="hover_thumb"><i class="fa fa-facebook"></i></a>
  75. <a href="#" title="Twitter" class="hover_thumb"><i class="fa fa-twitter"></i></a>
  76. <a href="#" title="Linkedin" class="hover_thumb"><i class="fa fa-linkedin"></i></a>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. <div class="team-caption"><h5><?php echo $team_designation[$i-1];?></h5><h3><?php echo $team_title[$i-1];?></h3></div>
  82. </div>
  83. <?php } } ?>
  84. </div>
  85. <!-- /Team Area -->
  86. </div>
  87. </div>
  88. <!-- /Team Section -->
  89. <div class="clearfix"></div>
Add Comment
Please, Sign In to add comment