<div class="home-right">
		     		<div class="home-find">
	     				<h2 class="title"><?php _e('Find your representative', 'dst'); ?></h2>
	     				<div class="find-description">
	     					<?php _e('It appears your location is in ', 'dst'); ?><span class="find-countryname"> </span><?php _e('. We have therefore searched for the DST representatives in your area.', 'dst'); ?>
						</div>
	     				<div id="map"></div>
	     				<div class="find-search clearfix">
		     				<form role="search" method="get" class="search-form" action="<?php echo home_url( '/' ); ?>">
		     					<div class="find-search-left">
		     						<h3 class="subtitle"><?php _e('ALL REPRESENTATIVES', 'dst'); ?></h3>
		     						<div class="representative-select">
		     							<select class="representative-dropdown" name="representative" style="color: #fff;">
			     							<option value=""><?php _e('Select a representative', 'dst'); ?></option>
			     							<?php 
				     							$args = array(
				     									'post_type' 		=> 'representatives',
														'posts_per_page'	=> 200,
														'orderby'			=> 'title',
														'order'   			=> 'ASC',
				     							);
												$query = new WP_Query( $args );
												if($query->have_posts()): while ($query->have_posts()): $query->the_post();
			     							?>
			     							<option value="<?php echo the_ID();?>"><?php echo the_title();?></option>
			     							<?php endwhile; endif;?>
			     						</select>
		     						</div>
		     						<h3 class="subtitle"><?php _e('Search representative', 'dst'); ?></h3>
		     						<input type="text" class="field" value="<?php _e('Search', 'dst'); ?>" onfocus="if(value=='<?php _e('Search', 'dst'); ?>')  {value=''}" onblur="if (value=='') {value='<?php _e('Search', 'dst'); ?>'}" />
		     						<h3 class="subtitle"><?php _e('or select below', 'dst'); ?></h3>
		     						<div class="representative-select">
			     						<select class="country-dropdown" name="country" style="color: #fff;">
		     								<option value=""><?php _e('Country', 'dst'); ?></option>
		     								<?php 
											  	$terms = get_terms('representatives-country'); 
											  	$arr = get_the_terms($post, 'representatives-country');
												$cur_term = $arr[0];
												//PRINT_R($cur_term);
												// we will use the first term to load ACF data from
												if( !empty($terms) ) :
													foreach ( $terms as $term ) :
										    ?>
										    <option value="<?php echo $term->slug?>"><?php echo __($term->name, 'dst');?></option>
										    <?php endforeach; endif;?>
			     						</select>
		     						</div>
		     						<div class="search-button"><a href="#"><span><?php _e('SEARCH', 'dst'); ?></span></a></div>
		     					
		     					</div>
	     					</form>
	     					<div class="find-search-right">
	     						<h3 class="subtitle"><?php _e('Matching Representatives', 'dst'); ?></h3>
	     						<div class="find-search-result"></div>
	     					</div>
	     				  </div>
		     			</div>
		     		</div>
		     	</div>
				
			
Click to access the login or register cheese
Receive the latest news

Subscribe To Our Newsletter

Get notified about new DST articles

x Logo: ShieldPRO
This Site Is Protected By
ShieldPRO