Multiple custom field values
-
Hello,
i was searching this forum but coludnt find what i was looking for.
Im using this code to display multiple custom field values:<?php $custom_field = get_post_meta($post->ID, "custom_field", false); if ($mjesto[0]=="") { ?> <!-- If there are no custom fields, show nothing --> <?php } else { ?> <?php foreach($custom_field as $custom_field) { echo $custom_field. ', ' ; } ?> <?php } ?>
This is what i need:
-if only 1 custom field value is entered, display it.
-if more than one custom field is entered, display custom message.So if you guys colud edit the code above…
thanks in advance!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Multiple custom field values’ is closed to new replies.