Hi,
Please open to edit functions.php
Find this code:-
function sf_get_custom_post_cat_list($postID) {
$post_categories = wp_get_post_categories( $postID );
$output = '';
foreach( $post_categories as $category ){
$cat = get_category( $category );
$colour = get_tax_meta($cat->term_id,'sf_tax_category_color');
$category_link = get_category_link( $cat->cat_ID );
$output .= '<a class="cat-item" style="background-color:'.$colour.';" href="'.$category_link.'">'.$cat->name.'</a>';
}
return $output;
}
Change with:-
function sf_get_custom_post_cat_list($postID) {
$post_categories = wp_get_post_categories( $postID );
$output = '';
$cat = get_category( $post_categories[0] );
$colour = get_tax_meta($cat->term_id,'sf_tax_category_color');
$category_link = get_category_link( $cat->cat_ID );
$output .= '<a class="cat-item" style="background-color:'.$colour.';" href="'.$category_link.'">'.$cat->name.'</a>';
return $output;
}
Thanks
Mohammad
Mohammad