get post custom function help
-
Hi,
I’ve got a template where I need to grab the values of several different custom fields associated with a post.
I can do this fine using the
get_post_meta
function – ie:<?php $profile_pic = get_post_meta($post->ID, 'profileimage', true); if($profile_pic) : ?> <img src="<?php echo $profile_pic; ?>" alt="<?php the_title(); ?>" /> <?php endif; ?>
But as there are up to 3 more custom post values to get I figure it’s much more efficient to grab them via the
get_post_custom
function. I can’t find in either the documentation or via any amount of searching on Google an explanation of how to retrieve the different values of the different keys using this function.Can some kind soul enlighten me?!!
- The topic ‘get post custom function help’ is closed to new replies.