Guest User

Untitled

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