<?php echo cp_emailarticle_button(); ?>
						<li><a class="tooltip" title="Share on Facebook" href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>" target="_blank"><i class="fa fa-facebook"></i></a></li>
						<li><a class="tooltip" title="Share on Twitter" href="https://twitter.com/intent/tweet?url=<?php the_permalink(); ?>&amp;text=<?php the_title(); ?>" target="_blank"><i class="fa fa-twitter"></i></a></li>
					</ul>
				</div>

				<?php cp_emailarticle_form($post->ID); ?>

				<h2 class="section-header">Rate this article</h2>
				<?php if(function_exists('the_ratings')) { the_ratings(); } ?>

				<?php if ($term_list = wp_get_post_tags($post->ID, array("fields" => "all"))): ?>
				<h2 class="section-header">Article tags</h2>
					<div class="article-tags">
					<?php foreach($term_list as $term): ?>
						<a target="blank" href="<?php echo get_atoz_letter_link($term->slug); ?>"><?php echo ucfirst($term->name); ?></a>
					<?php endforeach; ?>
					</div>
				<?php endif; ?>
				<?php endif; // end is_page() ?>
			<?php

				$related_advice = get_field('related_care_advice');
				if( $related_advice ){

			?>

				<section class="section related-posts">
					<h2 class="section-header">Related articles</h2>
					<ul class="headline-list">
function the_breadcrumb()
{
	echo '<nav class="breadcrumbs">';
	echo '	<ul>';
	if(!is_home())
	{

		echo '<li><a href="'.get_option('home').'">Home</a></li>';

		if(is_page())
		{
			echo '<li>'.$current_tax->name.'</li>';
		}

		if(is_tax())
		{

			$current_tax = get_queried_object();

				// check if it has a parent
				if($current_tax->parent != 0)
				{
					get_taxonomy_parents($current_tax->parent, $current_tax->taxonomy);					
				}

			// Add the current term last
			echo '<li>'.$current_tax->name.'</li>';

		}

		if(is_single())
		{
			$url = array_filter(explode("/", $_SERVER["HTTP_REFERER"]));
			//printme($url);

			if(in_array("tag",$url))
			{
			    // Get the
			    
				$term = array_pop($url);

				$letter = array_pop($url);

				echo '<li class="atoz-toggle"><a href="">A to Z</a></li>';
				echo '<li><a href="'.get_site_url().'/tag/'.$letter.'">'.ucfirst($letter).'</a></li>';
				echo '<li><a href="'.get_atoz_letter_link($term).'">'.ucfirst($term).'</a></li>';

			}
			elseif(strpos(end($url),'search') !== false)
			{
				// Display crumbs for search results
				echo '<li><a href="'.get_site_url().'/'.end($url).'">Search results</a></li>';
			}
			else
			{
				// Displaying the crumbs for links coming from categories
				global $post;

				//get the terms of the current post				
				$single_terms = get_the_terms( $post->ID, $post->post_type.'-categories', array( 'parent' => 0 ) );

				$url_term = array_pop($url);
				
				foreach ($single_terms as $term) {

					// Display crumb for link from category
					if($term->slug == $url_term)
					{
						get_taxonomy_parents($term->parent, $term->taxonomy);
						echo '<li><a href="'.get_term_link( $term ).'">'.$term->name.'</a></li>';
						break;
					}
					// Display crumb for link from anywhere else
					elseif(empty($url_term))
					{
						get_taxonomy_parents($term->parent, $term->taxonomy);
						echo '<li><a href="'.get_term_link( $term ).'">'.$term->name.'</a></li>';
						break;
					}

				}

			}


			//$post_type = get_post_type( $post );
			echo '<li>'.the_title().'</li>';			
		}

	}

	if( get_query_var('letter') )
	{
		echo '<li><a href="'.get_option('home').'">Home</a></li>';
		echo '<li><a href="">A to Z</a></li>';
		// get the current letter		
		echo '<li><a href="'.get_site_url().'/tag/'.get_query_var('letter').'">'.ucfirst(get_query_var('letter')).'</a></li>';
		if(get_query_var('term'))
		{
			echo '<li>'.ucfirst(get_query_var('term')).'</li>';
		}
	}

		// if Single

	echo '	</ul>';
	echo '</nav>';
}