Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




get_post_meta [ WordPress Function ]

get_post_meta ( $post_id, $key = '', $single = false )
Parameters:
  • (int) $post_id Post ID.
  • (string) $key Optional. The meta key to retrieve. By default, returns data for all keys.
  • (bool) $single Whether to return a single value.
Uses:
  • $wpdb
Links:
Returns:
  • (mixed) Will be an array if $single is false. Will be value of meta data field if $single is true.
Defined at:



Retrieve post meta field for a post.

Source


<?php
function get_post_meta($post_id$key ''$single false) {
    return 
get_metadata('post'$post_id$key$single);
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics