- Use this code for your two custom fields - type and size:
<?php $get_size_from_post = get_post_meta( get_the_ID(), 'size', true );
// check if the custom field has a value
if( ! empty( $get_size_from_post ) ) {
echo '<span class="size">';
echo $get_size_from_post ;
echo '</span>';
}
$get_type_from_post = get_post_meta( get_the_ID(), 'type', true );
// check if the custom field has a value
if( ! empty( $get_type_from_post ) ) {
echo '<span class="type">';
echo $get_type_from_post;
echo '</span>';
}
?>
- Sorry my bad about icons. Somehow didn’t see it yesterday. Sorry about that.
Let me know if there is anything else.