Instead of write manually the html code for your flags, you should create it using php and wordpress functions:
$countries = get_terms('country', array('hide_empty' => true) );
$exclude_terms = array('featured');
if ( ! empty($countries) && is_array($countries) ) { ?>
<img class="mapAdjust" src="https://wordpress.stackexchange.com/questions/114245/<?php bloginfo("template_url'); ?>/img/map-adjust.gif" />
<img class="map" src="https://wordpress.stackexchange.com/questions/114245/<?php bloginfo("template_url'); ?>/img/map.jpg" />
<?php
foreach ( $countries as $country ) {
if ( ! empty($exclude_terms) && in_array($country->slug, $exclude_terms) ) continue;
$name = esc_attr($country->name);
$slug = $country->slug;
?>
<div class="flag<?php echo str_replace(' ', '', $name); ?>">
<a href="<?php echo get_term_link($country, 'country') ?>" alt="<?php echo $name; ?>" title="<?php echo $name; ?>">
<img class="flag" src="https://wordpress.stackexchange.com/questions/114245/<?php bloginfo("template_url'); ?>/img/flags/<?php echo $slug; ?>-flag.png" />
</a> <!-- <?php echo $name; ?> -->
</div> <!-- /flagCont -->
<?php
}
}
I’ve used only 2 functions: