webriti

Add email link to team member in appointment wordpress theme

Aug 23rd, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.45 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.  
  62. ?>
  63. <div class="col-md-2 team-area">
  64. <?php
  65. $defalt_arg =array('class' => "img-responsive");
  66. if(has_post_thumbnail()){
  67. ?>
  68. <div class="team-image">
  69. <?php the_post_thumbnail('', $defalt_arg); ?>
  70. <?php } else { echo '<div class="team-image">'; } ?>
  71. <div class="team-showcase-overlay">
  72. <div class="team-showcase-overlay-inner">
  73. <div class="team-showcase-icons">
  74. <?php
  75. if($fb_meta_save){
  76. if($fb_meta_save_chkbx)
  77. { $target ="_blank"; } else { $target ="_self"; } ?>
  78. <a href="<?php if($fb_meta_save){ echo esc_html($fb_meta_save); } ?>" target="<?php echo $target; ?>" class="hover_thumb"><i class="fa fa-envelope"></i></a>
  79. <?php } ?>
  80. <?php
  81. if($twt_meta_save){
  82. if($twt_meta_save_chkbx)
  83. { $target ="_blank"; } else { $target ="_self"; } ?>
  84. <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>
  85. <?php } ?>
  86. <?php
  87. if($lnkd_meta_save){
  88. if($lnkd_meta_save_chkbx)
  89. { $target ="_blank"; } else { $target ="_self"; } ?>
  90. <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 } ?>
  91. </div>
  92. </div>
  93. </div>
  94. <?php
  95. if(has_post_thumbnail()){
  96. ?>
  97. </div> <?php } ?>
  98. <div class="team-caption"><h5><?php if(!empty($designation_meta_save)){
  99. echo $designation_meta_save; } ?></h5><h3><?php the_title(); ?></h3></div>
  100. </div> <?php if(!has_post_thumbnail()) { echo '</div>'; } ?>
  101. <?php if($i%6==0)
  102. { echo "<div class='clearfix'></div>"; }
  103. $i++; endwhile;
  104. } else {
  105. $team_title = array('John Doe', 'Sarah Culan', 'Chao Kang', 'Megan Sheryl');
  106. $team_designation = array('FOUNDER', 'DESIGNER', 'DEVELOPER', 'SALES & SEO');
  107. for($i=1 ; $i<=4 ; $i++ )
  108. { ?>
  109.  
  110. <div class="col-md-3 team-area">
  111. <div class="team-image">
  112. <img class="img-responsive" src="<?php echo WEBRITI_TEMPLATE_DIR_URI; ?>/images/team/team<?php echo $i; ?>.jpg">
  113. <div class="team-showcase-overlay">
  114. <div class="team-showcase-overlay-inner">
  115. <div class="team-showcase-icons">
  116. <a href="#" title="Facebook" class="hover_thumb"><i class="fa fa-envelope"></i></a>
  117. <a href="#" title="Twitter" class="hover_thumb"><i class="fa fa-twitter"></i></a>
  118. <a href="#" title="Linkedin" class="hover_thumb"><i class="fa fa-linkedin"></i></a>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. <div class="team-caption"><h5><?php echo $team_designation[$i-1];?></h5><h3><?php echo $team_title[$i-1];?></h3></div>
  124. </div>
  125. <?php } } ?>
  126. </div>
  127. <!-- /Team Area -->
  128. </div>
  129. </div>
  130. <!-- /Team Section -->
  131. <div class="clearfix"></div>
  132. <?php } ?>
  133. <!-- Clients Section -->
  134. <?php if( $about_setting['client_section_enable'] == 0) { get_template_part('index','client'); }?>
  135. <!-- /Clients Section -->
  136. <!--- Footer callout --->
  137. <?php if( $about_setting['footer_callout_section_enable'] == 0) { get_template_part('index','footer-callout'); }?>
  138. <!--- /Footer callout --->
  139. <div class="clearfix"></div>
  140. <?php get_footer(); ?>
Add Comment
Please, Sign In to add comment