Custom Field Values
-
Hi, I wanted to display certain custom field if it has a value. I already acquire one method but I dont know how to do it in multiple lines. I am not php guy so I would be happy to get help here. Here is the code I got.
<?php if ( get_post_meta($post->ID,'summary', true) ) { ?> <?php $values = get_post_custom_values("summary"); echo ' <strong>Summary:</strong> ' . $values[0]; ?> <?php } ?>
Aside from summary I also wanted to included other lines like Recommendation and Conclusion. So the final values for EACH field would be something like this:
Summary: Blah blah
Recommendation: Blah blah
Conclusion: Blah blahThanks in advance.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Custom Field Values’ is closed to new replies.