Guest User

Untitled

a guest
Feb 11th, 2019
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.29 KB | None | 0 0
  1. <?php
  2. $appointment_options=theme_setup_data();
  3. $callout_setting = wp_parse_args( get_option( 'appointment_options', array() ), $appointment_options );
  4. if($callout_setting['home_call_out_area_enabled'] == 0 ) {
  5. $imgURL = $callout_setting['callout_background'];
  6. if($imgURL != '') { ?>
  7. <div class="callout-section" style="background-image:url('<?php echo $imgURL;?>'); background-repeat: no-repeat; background-position: top left; background-attachment: <?php echo $callout_setting['callout_attachment']; ?>;">
  8. <?php }
  9. else
  10. { ?>
  11. <div class="callout-section" style="background-color:#ccc;">
  12. <?php } ?>
  13. <div class="overlay" style="background: none repeat scroll 0 0 <?php echo ($callout_setting['callout_overlay']!=true?'transparent':'rgba(0, 0, 0, 0.7)'); ?>;">
  14. <div class="container">
  15. <div class="row">
  16. <div class="col-md-12">
  17.  
  18. <h1><?php echo $callout_setting['home_call_out_title'];?></h1>
  19. <p><?php echo $callout_setting['home_call_out_description']; ?></p>
  20.  
  21. <?php
  22. if($callout_setting['home_call_out_btn1_text'] || $callout_setting['home_call_out_btn2_text'] != null):
  23. ?>
  24.  
  25. <div class="btn-area">
  26. <?php if($callout_setting['home_call_out_btn1_text'] != null): ?>
  27. <a href="<?php echo $callout_setting['home_call_out_btn1_link']; ?>" <?php if( $callout_setting['home_call_out_btn1_link_target'] == 1 ) { echo "target='_blank'"; } ?> class="callout-btn1"><?php echo $callout_setting['home_call_out_btn1_text'];
  28. ?></a>
  29. <?php endif; ?>
  30.  
  31. <?php if($callout_setting['home_call_out_btn2_text'] != null): ?>
  32. <a href="<?php echo $callout_setting['home_call_out_btn2_link']; ?>" <?php if( $callout_setting['home_call_out_btn2_link_target'] == 1 ) { echo "target='_blank'"; } ?> class="callout-btn2"><?php echo $callout_setting['home_call_out_btn2_text']; ?></a>
  33. <?php endif; ?>
  34. </div>
  35.  
  36. <?php endif; ?>
  37. </div>
  38. </div>
  39.  
  40. </div>
  41.  
  42. </div>
  43. </div>
  44. <!-- /Callout Section -->
  45. <div class="clearfix"></div>
  46.  
  47. <?php } ?>
  48.  
  49. <div class="container" id="teamhome">
  50. <!-- Team Area -->
  51. <div class="row"> <!-- id="team_scroll" -->
  52. <?php
  53. $appointment_options=theme_setup_data();
  54. $about_setting = wp_parse_args( get_option( 'appointment_options', array() ), $appointment_options );
  55.  
  56. $count_posts = wp_count_posts( 'appointment_team')->publish;
  57. $arg = array( 'post_type' => 'appointment_team','posts_per_page' =>$count_posts);
  58. $team = new WP_Query( $arg );
  59. $i=1;
  60. if($team->have_posts())
  61. { while($team->have_posts() ) : $team->the_post();
  62.  
  63. $designation_meta_save = sanitize_text_field( get_post_meta( get_the_ID(), 'designation_meta_save', true ));
  64. $description_meta_save = sanitize_text_field( get_post_meta( get_the_ID(), 'description_meta_save', true ));
  65. $fb_meta_save = sanitize_text_field( get_post_meta( get_the_ID(), 'fb_meta_save', true ));
  66. $fb_meta_save_chkbx = sanitize_text_field( get_post_meta( get_the_ID(), 'fb_meta_save_chkbx', true ));
  67. $lnkd_meta_save = sanitize_text_field( get_post_meta( get_the_ID(), 'lnkd_meta_save', true ));
  68. $lnkd_meta_save_chkbx = sanitize_text_field( get_post_meta( get_the_ID(), 'lnkd_meta_save_chkbx', true ));
  69. $twt_meta_save = sanitize_text_field( get_post_meta( get_the_ID(), 'twt_meta_save', true ));
  70. $twt_meta_save_chkbx = sanitize_text_field( get_post_meta( get_the_ID(), 'twt_meta_save_chkbx', true ));
  71.  
  72. ?>
  73. <div class="col-md-3 team-area">
  74. <?php
  75. $defalt_arg =array('class' => "img-responsive");
  76. if(has_post_thumbnail()){
  77. ?>
  78. <div class="team-image">
  79. <?php the_post_thumbnail('', $defalt_arg); ?>
  80. <?php } else { echo '<div class="team-image">'; } ?>
  81. <div class="team-showcase-overlay">
  82. <div class="team-showcase-overlay-inner">
  83. <div class="team-showcase-icons">
  84. <?php
  85. if($fb_meta_save){
  86. if($fb_meta_save_chkbx)
  87. { $target ="_blank"; } else { $target ="_self"; } ?>
  88. <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>
  89. <?php } ?>
  90. <?php
  91. if($twt_meta_save){
  92. if($twt_meta_save_chkbx)
  93. { $target ="_blank"; } else { $target ="_self"; } ?>
  94. <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>
  95. <?php } ?>
  96. <?php
  97. if($lnkd_meta_save){
  98. if($lnkd_meta_save_chkbx)
  99. { $target ="_blank"; } else { $target ="_self"; } ?>
  100. <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 } ?>
  101. </div>
  102. </div>
  103. </div>
  104. <?php
  105. if(has_post_thumbnail()){
  106. ?>
  107. </div> <?php } ?>
  108. <div class="team-caption"><h5><?php if(!empty($designation_meta_save)){
  109. echo $designation_meta_save; } ?></h5><h3><?php the_title(); ?></h3></div>
  110. </div> <?php if(!has_post_thumbnail()) { echo '</div>'; } ?>
  111. <?php if($i%4==0)
  112. { echo "<div class='clearfix'></div>"; }
  113. $i++; endwhile;
  114. } else {
  115. $team_title = array('John Doe', 'Sarah Culan', 'Chao Kang', 'Megan Sheryl');
  116. $team_designation = array(__('FOUNDER','appointment'), __('DESIGNER','appointment'),__('DEVELOPER','appointment'),__('DESIGNER'));
  117. for($i=1 ; $i<=4 ; $i++ )
  118. { ?>
  119.  
  120. <div class="col-md-3 team-area">
  121. <div class="team-image">
  122. <img class="img-responsive" src="<?php echo WEBRITI_TEMPLATE_DIR_URI; ?>/images/team/team<?php echo $i; ?>.jpg">
  123. <div class="team-showcase-overlay">
  124. <div class="team-showcase-overlay-inner">
  125. <div class="team-showcase-icons">
  126. <a href="#" title="Facebook" class="hover_thumb"><i class="fa fa-facebook"></i></a>
  127. <a href="#" title="Twitter" class="hover_thumb"><i class="fa fa-twitter"></i></a>
  128. <a href="#" title="Linkedin" class="hover_thumb"><i class="fa fa-linkedin"></i></a>
  129. </div>
  130. </div>
  131. </div>
  132. </div>
  133. <div class="team-caption"><h5><?php echo $team_designation[$i-1];?></h5><h3><?php echo $team_title[$i-1];?></h3></div>
  134. </div>
  135. <?php } } ?>
  136. </div>
  137. <!-- /Team Area -->
  138. </div>
Add Comment
Please, Sign In to add comment