Basic Custom Fields Question
-
Hi There,
Apologies in advance for this question, I can’t find an answer which makes me think it’s obvious and rudimentary.
I’m using Ben Martineu’s TheColumnist theme and in his individual posts pages he has “date” and “name” credits for images. I think I need to use custom fields to do this, but I’m totally lost as to what to input in the Name and Value fields.
The Columnist meta.php page looks like this, Thanks in advance!:
<div class="meta"> <ul> <?php //get meta custom fields $date = get_post_meta($post->ID, 'date', true); $time = get_post_meta($post->ID, 'time', true); $price = get_post_meta($post->ID, 'price', true); $rsvp = get_post_meta($post->ID, 'rsvp', true); $photo = get_post_meta($post->ID, 'photo', true); if ($date) { echo "<li><span>Date:</span> $date </li>"; } if ($time) { echo "<li><span>Time:</span> $time </li>"; } if ($price) { echo "<li><span>Price:</span> $price </li>"; } if ($rsvp) { echo "<li><span>RSVP:</span> $rsvp </li>"; } if ($photo) { echo "<li><span>Photo:</span> $photo </li>"; } else { } ?> </ul> </div> <div class="meta"> <p>Posted in <?php the_category(', ') ?></p> <p><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></p> <p><?php the_tags('Tagged with ', ', ', ''); ?></p> <p><?php edit_post_link('Edit this post', '', ' →'); ?></p> </div>
The topic ‘Basic Custom Fields Question’ is closed to new replies.