Guest User

Untitled

a guest
Aug 23rd, 2019
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.04 KB | None | 0 0
  1. <?php
  2. /**
  3. * Template Name: About Us
  4. *
  5. * @package WordPress
  6. * @subpackage spasalon
  7. */
  8.  
  9. get_header();
  10. $current_options = wp_parse_args( get_option( 'spa_theme_options', array() ), default_data() );
  11. the_post();
  12. $my_meta = get_post_meta( get_the_ID() ,'_my_meta', TRUE );
  13. if( isset($my_meta['banner_enable'])==true ) {
  14. spasalon_page_banner_strip();
  15. }
  16. else
  17. {
  18. spasalon_pink_banner_strip(); // banner strip
  19. }
  20. ?>
  21. <!-- About Section -->
  22. <section id="section" class="about">
  23. <div class="container">
  24.  
  25. <div class="row">
  26. <div class="col-md-8">
  27. <div class="about-info">
  28.  
  29.  
  30. <?php the_title('<h3 class="page-title txt-color">','</h3>'); // page title ?>
  31.  
  32.  
  33. <?php the_content(); // content ?>
  34.  
  35. </div>
  36. </div>
  37.  
  38. <?php
  39. $defalt_arg = array('class' => "img-circle" );
  40.  
  41. if( has_post_thumbnail() ):
  42. ?>
  43. <div class="col-md-4">
  44. <figure class="about-img-area">
  45. <?php the_post_thumbnail('full', $defalt_arg ); ?>
  46. </figure>
  47. </div>
  48. <?php endif; ?>
  49.  
  50. </div>
  51.  
  52. <?php if( $current_options['about_team_enable'] !=false): ?>
  53. <!--Separator--><div class="row"><div class="col-md-12"><div class="separator"></div></div></div><!--/Separator-->
  54.  
  55. <!-- Team -->
  56. <div class="row">
  57.  
  58. <?php if( $current_options['about_team_title'] != '' ){ ?>
  59. <div class="col-md-12">
  60. <h3 class="team-title txt-color">
  61. <?php echo $current_options['about_team_title']; ?>
  62. </h3>
  63. </div>
  64. <div class="clearfix"></div>
  65. <?php } ?>
  66.  
  67. <?php
  68. $i=1;
  69.  
  70. $arg = array( 'post_type' => 'spa_team', 'posts_per_page' => 11 );
  71.  
  72. $team = new WP_Query( $arg );
  73.  
  74. if($team->have_posts()):
  75.  
  76. while ( $team->have_posts() ) : $team->the_post();
  77.  
  78. $my_meta = get_post_meta( $post->ID ,'_my_meta', TRUE );
  79. ?>
  80. <div class="col-md-6 col-sm-6 col-xs-12">
  81. <div class="media team">
  82.  
  83. <?php if( has_post_thumbnail() ): ?>
  84. <figure class="team-gravatar">
  85. <?php the_post_thumbnail('thumbnail'); ?>
  86. </figure>
  87. <?php endif; ?>
  88.  
  89. <div class="media-body">
  90. <h3 class="team-name"><?php the_title(); ?></h3>
  91.  
  92. <span class="team-designation">
  93. <?php _e( 'Designation', 'spasalon' );echo ': '; if( isset( $my_meta['Designation'] ) ){ echo $my_meta['Designation']; } ?>
  94. </span>
  95.  
  96. <p>
  97. <?php if( isset( $my_meta['description'] ) ) echo $my_meta['description']; ?>
  98. </p>
  99.  
  100. <?php
  101. if(isset($my_meta['facebook_chkbx'])){$facebook_chkbx=1;} else{$facebook_chkbx=0;}
  102. if(isset($my_meta['twitter_chkbx'])){$twitter_chkbx=1;} else{$twitter_chkbx=0;}
  103. if(isset($my_meta['google_chkbx'])){$google_chkbx=1;} else{$google_chkbx=0;}
  104.  
  105. if(isset($my_meta['target_tab'])){$target_tab=1;} else{$target_tab=0;}
  106. ?>
  107. <ul class="team-social">
  108.  
  109. <?php if( $facebook_chkbx == 1 ): ?>
  110. <li class="facebook"><a <?php echo ($target_tab==true?'target="_blank"':''); ?> href="<?php if( isset( $my_meta['facebook_url'] ) ){ echo $my_meta['facebook_url']; } ?>" class="fa fa-facebook"></a></li>
  111. <?php endif; ?>
  112.  
  113. <?php if( $twitter_chkbx == 1 ): ?>
  114. <li class="twitter"><a <?php echo ($target_tab==true?'target="_blank"':''); ?> href="<?php if( isset( $my_meta['twitter_url'] ) ){ echo $my_meta['twitter_url']; } ?>" class="fa fa-twitter"></a></li>
  115. <?php endif; ?>
  116.  
  117. <?php if( $google_chkbx == 1 ): ?>
  118. <li class="googleplus"><a <?php echo ($target_tab==true?'target="_blank"':''); ?> href="<?php if( isset( $my_meta['google_url'] ) ){ echo $my_meta['google_url']; } ?>" class="fa fa-google-plus"></a></li>
  119. <?php endif; ?>
  120.  
  121. </ul>
  122.  
  123. </div>
  124. </div>
  125. </div>
  126. <?php
  127. if( $i%2==0 ) { // echo '<div class="clearfix"></div>';
  128.  
  129. } $i++;
  130.  
  131. endwhile;
  132. else:
  133.  
  134. for( $i=5; $i<=8; $i++ ){
  135.  
  136. echo '<div class="col-md-6 col-sm-6 col-xs-12">
  137. <div class="media team">
  138. <figure class="team-gravatar"><img alt="img" src="'.(get_template_directory_uri()).'/images/default/image_180x180.jpg"></figure>
  139. <div class="media-body">
  140. <h3 class="team-name">'.'Lerry Beth'.'</h3>'.
  141. '<span class="team-designation">'.__('Designation: Sr. Therapist','spasalon').'</span>'.
  142. '<p>'.'Dreamer who loves tee shirts, travelling and meeting new people. I like jazz music and bacon. Learning new things is one of my obsessions.'.'</p>'.
  143. '<ul class="team-social">
  144. <li class="facebook"><a href="#" class="fa fa-facebook"></a></li>
  145. <li class="twitter"><a href="#" class="fa fa-twitter"></a></li>
  146. <li class="googleplus"><a href="#" class="fa fa-google-plus"></a></li>
  147. </ul>
  148. </div>
  149. </div>
  150. </div>';
  151.  
  152. }
  153.  
  154. endif;
  155.  
  156. ?>
  157.  
  158. </div>
  159. <!-- End of Team -->
  160. <?php endif; ?>
  161.  
  162. </div>
  163. </section>
  164.  
  165. <div class="clearfix"></div>
  166.  
  167. <?php get_footer(); ?>
Add Comment
Please, Sign In to add comment