single-physician_post_type.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <?php get_header(); ?>
  2. <?php if( get_post_meta(get_the_ID(), 'header', true) != 'no') echo avia_title();
  3. do_action( 'ava_after_main_title' );
  4. ?>
  5. <div class='container_wrap container_wrap_first main_color <?php avia_layout_class( 'main' ); ?>'>
  6. <div class='container'>
  7. <main class='template-page content <?php avia_layout_class( 'content' ); ?> units' <?php avia_markup_helper(array('context' => 'content','post_type'=>'page'));?>>
  8. <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
  9. <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  10. <div class="flex_column av_one_third flex_column_div first">
  11. <div class="physician-image ">
  12. <?php srh_post_thumbnail();?>
  13. </div>
  14. <div class="physician-office">
  15. <?php
  16. if ( $terms = get_the_terms( $post->ID, 'location' ) ) {
  17. foreach( $terms as $term ) {
  18. $term_link = get_term_link( $term );
  19. echo '<a href="' . esc_url( $term_link ) . '">' . $term->name . '</a><br />';
  20. $office = get_term_meta( $term->term_id, 'address', true );
  21. echo '' . $office . '<br />';
  22. $phone = get_term_meta( $term->term_id, 'phone', true );
  23. echo '' . $phone . '<br />';
  24. echo '<iframe src="' . get_term_meta( $term->term_id, 'map', true ) . '" style="border: 0" allowfullscreen="" width="300" height="250" frameborder="0"></iframe>';
  25. }
  26. }
  27. ?>
  28. </div>
  29. </div>
  30. <div class="flex_column av_two_third flex_column_div last">
  31. <header class="entry-header">
  32. </header><!-- .entry-header -->
  33. <div class="entry-content">
  34. <h2><?php the_title(); ?></h2><br />
  35. <h3 class="physician-header">Specialty</h3>
  36. <h4 class="specialty-link"><?php echo get_the_term_list( get_the_ID(), 'specialties', '', ', ', '' ); ?></h4>
  37. <br />
  38. <?php $thecontent = get_the_content(); if(!empty($thecontent)) { ?>
  39. <h3 class="physician-header">Professional Bio</h3>
  40. <?php the_content(); } ?>
  41. <?php if ( get_post_meta( get_the_ID(), '_edu_edu', true) ) : ?>
  42. <h3 class="physician-header">Education</h3>
  43. <h4>Undergraduate</h4>
  44. <?php $edu = get_post_meta( get_the_ID(), '_edu_edu', true );?>
  45. <p><?php echo esc_html( $edu ); ?></p>
  46. <?php endif; ?>
  47. <?php if ( get_post_meta( get_the_ID(), '_edu_med', true) ) : ?>
  48. <h4>Medical School</h4>
  49. <?php $med = get_post_meta( get_the_ID(), '_edu_med', true );?>
  50. <p><?php echo esc_html( $med ); ?></p>
  51. <?php endif; ?>
  52. <?php if ( get_post_meta( get_the_ID(), '_edu_res', true) ) : ?>
  53. <h4>Residency</h4>
  54. <?php $res = get_post_meta( get_the_ID(), '_edu_res', true );?>
  55. <p><?php echo esc_html( $res ); ?></p>
  56. <?php endif; ?>
  57. <?php if ( get_post_meta( get_the_ID(), '_edu_fel', true) ) : ?>
  58. <h4>Fellowship</h4>
  59. <?php $fel = get_post_meta( get_the_ID(), '_edu_fel', true );?>
  60. <p><?php echo esc_html( $fel ); ?></p>
  61. <?php endif; ?>
  62. <?php if ( get_post_meta( get_the_ID(), '_id_emp', true) ) : ?>
  63. <?php $emp = get_post_meta( get_the_ID(), '_id_emp', true );?>
  64. <br /><p><small><em><?php echo esc_html( $emp ); ?></em></small></p>
  65. <?php endif; ?>
  66. </div><!-- .entry-content -->
  67. </div>
  68. </article><!-- #post-## -->
  69. <?php endwhile; ?>
  70. </main>
  71. <?php
  72. //get the sidebar
  73. $avia_config['currently_viewing'] = 'page';
  74. get_sidebar();
  75. ?>
  76. </div><!--end container-->
  77. </div><!-- close default .container_wrap element -->
  78. <?php get_footer(); ?>