Separator symbol between custom fields
-
Hello
This is my code for display custom fields (brand, city):
<?php if ( get_post_meta($post->ID, 'brand', $single = true) != '' ) { ?> <?php echo get_post_meta($post->ID, 'brand', $single = true) ?> | <?php } ?> <?php if ( get_post_meta($post->ID, 'city', $single = true) != '' ) { ?> <?php echo get_post_meta($post->ID, 'city', $single = true) ?> | <?php } ?>
my question is how can I hide the symbol separator | after first custom field if only have that custom field?
Thanks.
ddorr
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Separator symbol between custom fields’ is closed to new replies.