- Diese Veranstaltung hat bereits stattgefunden.
testv-Titel
9. März 2016 um 8:00 bis 17:00
1€testv-text ij oij oij oij oij oij oij oij oij
- id is the ID of the post you want the meta values for. Use $post->ID to get a post’s ID within the $post variable scope. Use get_the_ID() to retrieve the ID of the current item in the WordPress Loop.
- $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.
Implementation Details
The PostMeta information is stored in a new table, $wpdb->postmeta. This table has four fields:
- ‘meta_id‘ – A unique id for each entry.
- ‘post_id‘ – The ID of the post for this metadata.
- ‘meta_key‘ – The name of the ‘key’.
- ‘meta_value‘ – The value associated with the key.
The values from this table are pulled into a structured multi-dimensional array called $post_meta_cache, just after the $posts array is fetched in wp-blog-header.php. This variable will only contain values for the list of posts fetched for the current page build. The structure of the array will look something