get_post_custom_values not working in wordpress

Some times get_post_custom_values not work for direct array at that time we have to use foreach loop like below.

$mykey_values = get_post_custom_values(‘Designation’, $post->ID);
foreach ( $mykey_values as $key => $value ) {
echo “($value km)”;


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s