Guest User

home-doctor.php

a guest
May 4th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.31 KB | None | 0 0
  1. <!-- Doctors Start -->
  2. <?php $health_data= health_care_get_options(); ?>
  3. <span class="anchor" id="deppartment-section"></span>
  4. <div class="container-fluid space">
  5. <div class="container doctors">
  6. <?php if($health_data['member_heading']!=''){ ?>
  7. <h1 class="color"><?php echo $health_data['member_heading']; ?></h1>
  8. <?php if($health_data['member_icon']!=''){ ?>
  9. <div class="ln2 color"></div>
  10. <span class="<?php echo $health_data['member_icon']; ?> color heart"></span>
  11. <div class="ln3 color"></div>
  12. <?php } } ?>
  13. <div class="button-group ">
  14. <?php $args = array( 'post_type' => 'hc_deptts','posts_per_page' =>-1);
  15. $member_cats= new WP_Query($args);
  16. if( $member_cats->have_posts() ){ ?>
  17. <button class="button is-checked" id="hc_all" data-filter="*"><?php _e('All Departments','weblizar'); ?></button>
  18. <?php while ( $member_cats->have_posts() ) : $member_cats->the_post(); ?>
  19. <button class="button" id="<?php echo str_replace(' ', '_', get_the_title()); ?>"><?php echo get_the_title(); ?></button>
  20. <?php endwhile;
  21. }else{?>
  22. <button class="button is-checked" id="hc_all" data-filter="*"><?php _e('All Departments','weblizar'); ?></button>
  23. <?php for($i=1; $i<=6; $i++){ ?>
  24. <button class="button" id="deppt_<?php echo $i; ?>">Department <?php echo $i; ?></button>
  25. <?php } } ?>
  26. </div>
  27. <?php $args = array( 'post_type' => 'hc_member','posts_per_page' =>-1);
  28. $mambers= new WP_Query($args);
  29. if( $mambers->have_posts() ){ ?>
  30. <div class="home-docs">
  31. <?php while ( $mambers->have_posts() ) : $mambers->the_post();
  32. $member_cat= get_post_meta( get_the_ID(), 'member_cat', true );
  33. $cats=explode(" ,",$member_cat); ?>
  34. <?php if(has_post_thumbnail()): ?>
  35. <div class="element-item col-md-4 hc_display col-sm-6 wl-gallery <?php foreach($cats as $cat){ echo str_replace(' ', '_', $cat).' '; } ?>" data-category="transition" >
  36. <h3><a href="<?php the_permalink(); ?>" ><?php the_title(); ?></a></h3>
  37. <div class="img-thumbnail">
  38. <?php $defalt_arg =array('class'=>"img-responsive home_member_thumb");
  39. the_post_thumbnail('home_member_thumb', $defalt_arg);
  40. ?>
  41. <div class="overlay">
  42. <h4><a class="hc-member-title" href="<?php the_permalink(); ?>" ><?php the_title(); ?></a></h4>
  43. <?php if(get_post_meta( get_the_ID(), 'member_post', true )!=''){ ?>
  44. <h5>(<?php echo get_post_meta( get_the_ID(), 'member_post', true ); ?> )</h5>
  45. <?php } ?>
  46. <h5><?php foreach($cats as $cat){ echo $cat.' '; } ?></h5>
  47. <?php $member_exp = sanitize_text_field( get_post_meta( get_the_ID(), 'member_exp', true ));
  48. if($member_exp!=''){?>
  49. <button class="" type="button"><?php echo $member_exp ; ?></button>
  50. <?php } ?>
  51. <a class="btn" <?php if(get_post_meta( get_the_ID(), 'member_link', true )!=''){ ?> href="<?php echo get_post_meta( get_the_ID(), 'member_link', true ); ?>" target="_blank" <?php }else{ ?> href="<?php the_permalink(); ?>"<?php } ?> ><?php _e('View Profile','weblizar'); ?></a>
  52. <p class="member_social">
  53. <?php $member_twitter = sanitize_text_field( get_post_meta( get_the_ID(), 'member_twitter', true ));
  54. if($member_twitter!=''){ ?>
  55. <a href="<?php echo $member_twitter; ?>"><span class="fa fa-twitter icon"></span></a>
  56. <?php }
  57. $member_fb = sanitize_text_field( get_post_meta( get_the_ID(), 'member_fb', true ));
  58. if($member_fb!=''){ ?>
  59. <a href="<?php echo $member_fb; ?>"><span class="fa fa-facebook icon"></span></a>
  60. <?php }
  61. $member_google = sanitize_text_field( get_post_meta( get_the_ID(), 'member_google', true ));
  62. if($member_google!=''){ ?>
  63. <a href="<?php echo $member_google; ?>"><span class="fa fa-google-plus icon"></span></a>
  64. <?php } ?>
  65. </p>
  66. </div>
  67. </div>
  68. </div>
  69. <?php endif;
  70. endwhile; ?>
  71. </div>
  72. <?php }else{ ?>
  73. <div class="home-docs">
  74. <?php for($i=1; $i<=6; $i++){ ?>
  75. <div class="element-item col-md-4 hc_display col-sm-6 wl-gallery deppt_<?php echo $i; ?>" data-category="transition" >
  76. <h3>GERARD BUTLER</h3>
  77. <div class="img-thumbnail">
  78. <img class="img-responsive" src="<?php echo get_stylesheet_directory_uri(); ?>/images/members/doc<?php echo $i; ?>.jpg" alt=""/>
  79. <div class="overlay">
  80. <h4>Cardiac Doctor</h4>
  81. <h5>The Speciality of the doctor is that she never say no to patient.</h5>
  82. <button class="" type="button">20 Year Experience</button>
  83. <button class="btn" type="button">View Profile</button>
  84. <a href=""><span class="fa fa-twitter icon"></span></a>
  85. <a href=""><span class="fa fa-facebook icon"></span></a>
  86. <a href=""><span class="fa fa-google-plus icon"></span></a>
  87. </div>
  88. </div>
  89. </div>
  90. <?php } ?>
  91. </div>
  92. <?php } ?>
  93. </div>
  94. </div>
  95. <!-- Doctors End -->
  96. <script>
  97. jQuery(window).load(function(){
  98. jQuery('.button-group .button').click(function() {
  99. var data= jQuery(this).attr('id');
  100. jQuery('.button-group .button').removeClass('is-checked');
  101. jQuery(this).addClass('is-checked');
  102. jQuery('.element-item').removeClass('hc_display').fadeOut();
  103. jQuery('.element-item.'+data).addClass('hc_display').fadeIn();
  104. });
  105. jQuery('#hc_all').click(function() {
  106. jQuery('.element-item').addClass('hc_display');
  107. });
  108. });
  109. </script>
Add Comment
Please, Sign In to add comment