I am trying to get metadata for a post (of custom post type). I had a look in the database, and the table "wp_postmeta" holds a row with "post_id" = 65, "meta_key" = "name_text" and "meta_value" = "Lars Åkerkvist".
I am trying to fetch that value, Lars Åkerkvist, using get_post_meta as below
get_post_meta(65,"name_text",true)
But it always returns a 0. What am i doing wrong here?
0
is not a valid return fromget_post_meta()
unless it is the value which is stored in there. It returns an empty string on failure.