taxonomy-location.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <?php get_header(); ?>
  2. <div id='main' data-scroll-offset='0'>
  3. <div class='stretch_full container_wrap alternate_color light_bg_color title_container'>
  4. <div class='container'>
  5. <h1 class='main-title entry-title'><?php single_cat_title(''); ?></h1>
  6. <div class="breadcrumb breadcrumbs avia-breadcrumbs"><div class="breadcrumb-trail" xmlns:v="http://rdf.data-vocabulary.org/#"><span class="trail-before"><span class="breadcrumb-title">You are here:</span></span> <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="SRH" rel="home" class="trail-begin">Home</a> <span class="sep">/</span> <span class="trail-end"><?php the_archive_title( '', '' ); ?></span></div></div></div></div>
  7. <div class='container_wrap container_wrap_first main_color sidebar_right'>
  8. <div class='container_wrap container_wrap_first main_color <?php avia_layout_class( 'main' ); ?>'>
  9. <div class='container'>
  10. <main class='template-page content <?php avia_layout_class( 'content' ); ?> units' <?php avia_markup_helper(array('context' => 'content','post_type'=>'page'));?>>
  11. <div class="location">
  12. <?php
  13. $term = get_term_by( 'slug', get_query_var('term'), get_query_var('taxonomy') );
  14. $queried_object = get_queried_object();
  15. $term_id = $queried_object->term_id;
  16. $taxonomy_name = 'location';
  17. echo '<h4>' . get_term_meta( $term_id, 'address', true ) . '</h4>';
  18. echo '<h4>Phone: ' . get_term_meta( $term_id, 'phone', true ) . ' , Fax: ' . get_term_meta( $term_id, 'fax', true ) . '</h4>';
  19. echo '<h4>Office Hours: ' . get_term_meta( $term_id, 'hours', true ) . '</h4>';
  20. ?>
  21. </div>
  22. <br />
  23. <?php the_archive_description( '<div class="taxonomy-description">', '</div>' );?>
  24. <div class='hr hr-short hr-center avia-builder-el-1 el_after_av_textblock el_before_av_one_full '><span class='hr-inner ' ><span class='hr-inner-style'></span></span></div>
  25. <h3>Our Physicians:</h3>
  26. <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
  27. <article class="physician-location" id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  28. <?php srh_post_thumbnail();?>
  29. <header class="entry-header"
  30. <a href="<?php the_permalink(); ?>" ><?php the_title( '<h5 class="physician entry-title">', '</h5>' ); ?></a>
  31. </header><!-- .entry-header -->
  32. <div class="entry-content">
  33. </div><!-- .entry-content -->
  34. </article><!-- #post-## -->
  35. <?php endwhile; else :?>
  36. <p>No Physicians Available</p>
  37. <?php endif; ?>
  38. <div class='hr hr-short hr-center avia-builder-el-1 el_after_av_textblock el_before_av_one_full '><span class='hr-inner ' ><span class='hr-inner-style'></span></span></div>
  39. <div class="entry-content details">
  40. <?php
  41. $location_details = get_term_meta( $term_id, 'details', true );
  42. if ( !empty($location_details) ) {
  43. $details= apply_filters( 'the_content', get_term_meta( $term_id, 'details', true ) );
  44. echo do_shortcode( get_term_meta ($term_id, 'details', true) );
  45. }
  46. ?>
  47. </div>
  48. <div class="additional_locations">
  49. <?php
  50. $term_children = get_term_children( $term_id, $taxonomy_name );
  51. if ( !empty( $term_children ) && !is_wp_error( $term_children ) ) { ?>
  52. <div class="togglecontainer">
  53. <section class="av_toggle_section"><div class="single_toggle" data-tags="{All}">
  54. <p data-fake-id="#toggle-id-0" class="toggler">Additional Locations<span class="toggle_icon"><span class="vert_icon"></span><span class="hor_icon"></span></span></p>
  55. <div id="toggle-id-3-container" class="toggle_wrap " >
  56. <div class="toggle_content invers-color" itemprop="text">
  57. <?php echo '<ul>';
  58. foreach ( $term_children as $child ) {
  59. $term = get_term_by( 'id', $child, $taxonomy_name );
  60. echo '<li><a href="' . get_term_link( $child, $taxonomy_name ) . '">' . $term->name . '</a></li>';
  61. echo '<li><a href="' . get_term_link( $child, $taxonomy_name ) . '">' . get_term_meta( $term->term_id, 'address', true ) . '</a></li><br />';
  62. }
  63. echo '</ul>'; ?>
  64. </div>
  65. </div></div>
  66. </section>
  67. </div>
  68. <?php } ?>
  69. </div>
  70. <div class='hr hr-short hr-center avia-builder-el-1 el_after_av_textblock el_before_av_one_full '><span class='hr-inner ' ><span class='hr-inner-style'></span></span></div>
  71. <div class="map">
  72. <?php
  73. $mapbox = get_term_meta( $term_id, 'map', true );
  74. if ( !empty($mapbox) ) { ?>
  75. <h3>Map</h3>
  76. <?php
  77. echo '<iframe src="' . get_term_meta( $term_id, 'map', true ) . '" style="border: 0" allowfullscreen="" width="600" height="450" frameborder="0"></iframe>';
  78. }
  79. ?>
  80. </div>
  81. </main>
  82. <?php
  83. //get the sidebar
  84. $avia_config['currently_viewing'] = 'page';
  85. get_sidebar();
  86. ?>
  87. </div><!--end container-->
  88. </div>
  89. </div><!-- close default .container_wrap element -->
  90. <?php get_footer(); ?>