I am trying to use the - <?php the_meta(); ?> FROM A PAGE - to grab a custom field, but I would like to get the value of a field (in this case its name is 'review') without the name coming up('review') in front of it.
Can anybody help me edit my function to get this going?
Also, if I add a new field, how can I specifically call that field?
any help is greatly appreciated..
Thanks, I just can't seem to figure out how to add code to not show the custom field name? Any ideas?
<?php
$review = get_post_meta($post->ID, 'review', true);
if (review){
echo review;
}
?>
I tried this but it simply echo's 'review' instead of the custom field without that name..
Hi MichaelH, thanks for your continued help, but the $review didn't work either, I don't get an error, I just get a blank.
This is a custom field for a PAGE, not a post, would that have something to do with it?
the_meta() works but not get_post_meta....
thanks for your continued help with this...
Then make sure you are using that in a loop where $post->ID is a valid value.
If necessary paste all the code from that template (Page Template) at wordpress.pastebin.com and report the link back here and maybe someone can spot the problem.
is it possible to get the the_meta() outside the loop without the key value? My div structure is such that it is outside the loop....