difference between get_post_custom and get_post_custom_values and get_post_meta
-
Greetings
I’m playing with the ‘add_meta_boxes’ to understand how it works and how different it is from custom field
when I look at the database, it seems both are the same value
it is only a difference visual aspect on the post page
I have seen there is also different function, but to me they return the same
let say I have add an extra box named ‘price’
what is the difference between$custom = get_post_custom($post->ID); $price = $custom["price"][0];
and
$price2 = get_post_custom_values('price',$post->ID,);
and
$price3 = get_post_meta($post->ID, 'price', true);
to me they pull out the same date, is there performance difference? is one better than the other to use? if I have several ‘custom field’ to retrieve, is that best performance white to use get_post_custom? is that generating only one query while get_post_meta make a query per request?
thank you in advace
Steffy
- The topic ‘difference between get_post_custom and get_post_custom_values and get_post_meta’ is closed to new replies.