How to display custom data from custom post types in WordPress?

Posted by Prem Tiwari | Updated on

Want to display custom data from custom post types in WordPress? There’s two wp functions to retrieve the custom post type’s metadata: get_post_custom_values and get_post_meta. The difference being, that get_post_custom_values can access non-unique custom fields, i.e. those with more than one value associated with a single key. You may choose to use it for unique fields also though – question of taste.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers