Simple custom field question
-
I’ve been working too long and my brain hurts, so if somebody could help me with this simple problem, that would be great.
I have a section on my site with various information for events going on in my county. The main information is being added using custom fields so, for example, the town is a custom field and I just want it to simply print it out as it is typed in.
I’m using the code below, but it doesn’t work. It shows the section on Town: in bold, but it doesn’t show the actual info.
I have checked, and it is in the correct place in the post custom field.
<?php if( get_post_meta($post->ID, "eventtown", true) ): ?> <b>Town: </b><?php echo $eventtown; ?> <br /> <?php else: ?> <?php endif; ?>Here is the URL if it helps:
http://inhampshire.net/2010/04/23/horror-uk
The topic ‘Simple custom field question’ is closed to new replies.