Guest User

Untitled

a guest
Apr 30th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.11 KB | None | 0 0
  1. <?php
  2. /**
  3. Template Name: About-us
  4. */
  5. get_header();
  6. get_template_part('index','banner');
  7. $appointment_options=theme_setup_data();
  8. $about_setting = wp_parse_args( get_option( 'appointment_options', array() ), $appointment_options ); ?>
  9.  
  10. <!-- About Section -->
  11. <div class="about-section">
  12. <div class="page-builder">
  13. <div class="container">
  14. <div class="row">
  15. <div class="col-md-12">
  16. <?php
  17. the_post();
  18. the_content();?>
  19. </div>
  20. </div>
  21. </div>
  22. </div>
  23. </div>
  24. <!-- /About Section -->
  25. <div class="clearfix"></div>
  26. <!-- Team Section -->
  27. <?php if( $about_setting['team_section_enable' ] == '') { ?>
  28. <div class="team-section">
  29. <div class="container">
  30.  
  31. <!-- Section Title -->
  32. <div class="row">
  33. <div class="col-md-12">
  34. <div class="section-heading-title">
  35. <h1><?php echo $about_setting['about_team_title']; ?></h3>
  36. <p><?php echo $about_setting['about_team_description']; ?></p>
  37.  
  38. </div>
  39. </div>
  40. </div>
  41. <!-- /Section Title -->
  42.  
  43. <!-- Team Area -->
  44. <div class="row"> <!-- id="team_scroll" -->
  45. <?php
  46. $count_posts = wp_count_posts( 'appointment_team')->publish;
  47. $arg = array( 'post_type' => 'appointment_team','posts_per_page' =>$count_posts);
  48. $team = new WP_Query( $arg );
  49. $i=1;
  50. if($team->have_posts())
  51. { while($team->have_posts() ) : $team->the_post();
  52.  
  53. $designation_meta_save = sanitize_text_field( get_post_meta( get_the_ID(), 'designation_meta_save', true ));
  54. $description_meta_save = sanitize_text_field( get_post_meta( get_the_ID(), 'description_meta_save', true ));
  55. $fb_meta_save = sanitize_text_field( get_post_meta( get_the_ID(), 'fb_meta_save', true ));
  56. $fb_meta_save_chkbx = sanitize_text_field( get_post_meta( get_the_ID(), 'fb_meta_save_chkbx', true ));
  57. $lnkd_meta_save = sanitize_text_field( get_post_meta( get_the_ID(), 'lnkd_meta_save', true ));
  58. $lnkd_meta_save_chkbx = sanitize_text_field( get_post_meta( get_the_ID(), 'lnkd_meta_save_chkbx', true ));
  59. $twt_meta_save = sanitize_text_field( get_post_meta( get_the_ID(), 'twt_meta_save', true ));
  60. $twt_meta_save_chkbx = sanitize_text_field( get_post_meta( get_the_ID(), 'twt_meta_save_chkbx', true ));
  61. $team_work = sanitize_text_field( get_post_meta( get_the_ID(), 'team_work', true ));
  62. $team_work_chkbx = sanitize_text_field( get_post_meta( get_the_ID(), 'team_work_chkbx', true ));
  63.  
  64. ?>
  65. <div class="col-md-3 team-area">
  66. <?php
  67. $defalt_arg =array('class' => "img-responsive");
  68. if(has_post_thumbnail()){
  69. ?>
  70. <div class="team-image">
  71. <?php the_post_thumbnail('', $defalt_arg); ?>
  72. <?php } else { echo '<div class="team-image">'; } ?>
  73. <div class="team-showcase-overlay">
  74. <div class="team-showcase-overlay-inner">
  75. <div class="team-showcase-icons">
  76. <?php
  77. if($fb_meta_save){
  78. if($fb_meta_save_chkbx)
  79. { $target ="_blank"; } else { $target ="_self"; } ?>
  80. <a href="<?php if($fb_meta_save){ echo esc_html($fb_meta_save); } ?>" target="<?php echo $target; ?>" class="hover_thumb"><i class="fa fa-facebook"></i></a>
  81. <?php } ?>
  82. <?php
  83. if($twt_meta_save){
  84. if($twt_meta_save_chkbx)
  85. { $target ="_blank"; } else { $target ="_self"; } ?>
  86. <a href="<?php if($twt_meta_save){ echo esc_html($twt_meta_save); } ?>" target="<?php echo $target; ?>" class="hover_thumb" ><i class="fa fa-twitter"></i></a>
  87. <?php } ?>
  88. <?php
  89. if($lnkd_meta_save){
  90. if($lnkd_meta_save_chkbx)
  91. { $target ="_blank"; } else { $target ="_self"; } ?>
  92. <a href="<?php if($lnkd_meta_save){ echo esc_html($lnkd_meta_save); } ?>" target="<?php echo $target; ?>" class="hover_thumb"><i class="fa fa-linkedin"></i></a>
  93. <?php }
  94. if($team_work){
  95. if($team_work_chkbx)
  96. { $target ="_blank"; } else { $target ="_self"; } ?>
  97. <a href="<?php if($team_work){ echo esc_html($team_work); } ?>" target="<?php echo $target; ?>" class="hover_thumb"><i class="fa fa-user-o"></i></a>
  98. <?php } ?>
  99. </div>
  100. </div>
  101. </div>
  102. <?php
  103. if(has_post_thumbnail()){
  104. ?>
  105. </div> <?php } ?>
  106. <div class="team-caption"><h5><?php if(!empty($designation_meta_save)){
  107. echo $designation_meta_save; } ?></h5><h3><?php the_title(); ?></h3></div>
  108. </div> <?php if(!has_post_thumbnail()) { echo '</div>'; } ?>
  109. <?php if($i%4==0)
  110. { echo "<div class='clearfix'></div>"; }
  111. $i++; endwhile;
  112. } else {
  113. $team_title = array('John Doe', 'Sarah Culan', 'Chao Kang', 'Megan Sheryl');
  114. $team_designation = array(__('FOUNDER','appointment'), __('DESIGNER','appointment'),__('DEVELOPER','appointment'),__('DESIGNER'));
  115. for($i=1 ; $i<=4 ; $i++ )
  116. { ?>
  117.  
  118. <div class="col-md-3 team-area">
  119. <div class="team-image">
  120. <img class="img-responsive" src="<?php echo WEBRITI_TEMPLATE_DIR_URI; ?>/images/team/team<?php echo $i; ?>.jpg">
  121. <div class="team-showcase-overlay">
  122. <div class="team-showcase-overlay-inner">
  123. <div class="team-showcase-icons">
  124. <a href="#" title="Facebook" class="hover_thumb"><i class="fa fa-facebook"></i></a>
  125. <a href="#" title="Twitter" class="hover_thumb"><i class="fa fa-twitter"></i></a>
  126. <a href="#" title="Linkedin" class="hover_thumb"><i class="fa fa-linkedin"></i></a>
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. <div class="team-caption"><h5><?php echo $team_designation[$i-1];?></h5><h3><?php echo $team_title[$i-1];?></h3></div>
  132. </div>
  133. <?php } } ?>
  134. </div>
  135. <!-- /Team Area -->
  136. </div>
  137. </div>
  138. <!-- /Team Section -->
  139. <div class="clearfix"></div>
  140. <?php } ?>
  141. <!-- Clients Section -->
  142. <?php if( $about_setting['client_section_enable'] == 0) { get_template_part('index','client'); }?>
  143. <!-- /Clients Section -->
  144. <!--- Footer callout --->
  145. <?php if( $about_setting['footer_callout_section_enable'] == 0) { get_template_part('index','footer-callout'); }?>
  146. <!--- /Footer callout --->
  147. <div class="clearfix"></div>
  148. <?php get_footer(); ?>
Add Comment
Please, Sign In to add comment