I am trying to use the below code snippet to display an image and then wrap it in a link to a specific term archive page. In this case, I have a custom taxonomy (Series) with a few different terms. The variable $series outputs the Term Object, therefore I want to use the get_term_link function to get the URL to the terms archive page.
The documentation for get_term_link (http://codex.wordpress.org/Function_Reference/get_term_link) says that I should simply be able to provide the term object and it will work, but it's not. I'm getting a partial-page load, meaning the code is breaking when it reaches this function.
Any help is appreciated!
$imageid = get_sub_field('series_banner', 'options');
$image = wp_get_attachment_image( $imageid, 'home-series-banner');
$series = get_sub_field('series_link', 'options'); //Returns the term object ?>
<a href="<?php echo get_term_link($series); ?>"><?php echo $image; ?></a>