display post meta data
-
I am having trouble displaying custom meta data. I have tried these two bits of code in my loop:
echo get_post_meta($post->ID, 'towns', true);
$key="towns"; echo get_post_meta($post->ID, $key, true);
They both display “Type Town” and I want to only display the data which is the actual town.
Can someone tell me where I am going wrong please?
Thanks
Martin
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘display post meta data’ is closed to new replies.