groups

name language licence
WORDPRESS GET URL PHP BSD
To detect if a plugin is installed... PHP Other
Styling Images in WordPress PHP Other
Displaying Custom Fields PHP Other
Getting Custom Fields PHP Other

< 1 2 3 4 5 6 7 8 9 10 11 12 >



language: PHP
licence: Other

Getting Custom Fields

options: view full snippetsend to code collector
To fetch meta values use the get_post_meta() function:

 get_post_meta($post_id, $key, $single);

    * $post_id is the ID of the post you want the meta values for. Use $post->ID to get a post's ID.
    * $key is a string containing the name of the meta value you want.
    * $single can either be true or false. If set to true then the function will return a single result, as a string. If false, or not set, then the function returns an array of the custom fields. 
	
(Continues...)