groups

name language licence
To detect if a plugin is installed... PHP Other
Creating a Multiple Script File JAVA PHP Other
Styling Images in WordPress PHP Other
Displaying Custom Fields PHP Other
Getting Custom Fields PHP Other
PostMeta Functions PHP Other
Add Social Network Links to Any Page Without a Plug-In PHP Other
Blueprint to Wordpress PHP Other

< 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 >



language: PHP
licence: Other

PostMeta Functions

options: view full snippetsend to code collector
 Internal Functions

These functions are intended for use inside The Loop, and all return arrays.

get_post_custom()
    Get all key/value data for the current post. 
get_post_custom_keys()
    Get a list of all key names for the current post. 
get_post_custom_values($key)
    Get the list of values for a particular key on the current post. 
get_post_meta($post_id, $key, $single = false)
    In WP 1.5 and beyond, this function returns the meta information without cache problems. The function requires the post id, the key, and if $single is set to TRUE, it returns only the first result (NOT as an array) for PHP use. 

This will output the resulting meta value (notice the addition of "echo"):
<?php $key="mykey"; echo get_post_meta($post->ID, $key, true); ?>
	
(Continues...)