displayTopTen($year['term_id'], $yearslug); ?>
}
function displayTopTenList($yearslug) {
//Show Top Ten List in sidebar
global $post;
$args = array(
'post_type' => 'topten',
'post_status' => 'publish',
'toptenyear' => $yearslug,
'posts_per_page' => -1,
'orderby' => 'meta_value_num',
'meta_key' => 'item_num',
'order' => 'ASC',
'meta_query' => array(
array(
'key' => 'item_num',
'value' => array( '1','2','3','4','5','6','7','8','9','10' ),
'type' => 'CHAR',
'compare' => 'IN'
)
)
);
$loop = new WP_Query( $args );
?>
}
function displayTopTenYearImage($yearid, $yearslug) {
$imageurl = get_field('header_image', 'toptenyear_' . $yearid);
$yeartext = get_field('header_text', 'toptenyear_' . $yearid);
if ($yeartext == '')
$yeartext = "Vermont Law Top 10 Environmental Watch List";
?>