I’m trying to build a slider based on a custom taxonomy on a custom post type. The custom post is products and the taxonomy is type.
I’ve been able to successfully get the taxonomy to display properly, but I’m having trouble getting the the custom meta field I added to show.
The code for my working taxonomy display is below and I want to get the meta field (which is called blockicon) to display in
Hope that makes sense and someone can help. Thanks!
<div id="slider"><?php
$args = array( 'taxonomy' => 'type' ); $types = get_terms('type', $args);
$count = count($types); $i=0;
if ($count > 0) {
foreach ($types as $type) {
$i++;
$type_list .= '<div class="slider-' . $type->slug . ' container">';
$type_list .= '<div class="slider-text divider">';
$type_list .= '<i class="aspera-icon lrg">a</i>';
$type_list .= '<h1>' . $type->name . '</h1>';
$type_list .= '<h5>' . $type->description .'</h5>';
$type_list .= '</div>';
$type_list .= '</div>';
}
echo $type_list;
}
?>
</div>
1 comment