Get the correct meta_value with get_post_meta
get_post_meta() is simply just a wrapper for get_metadata(). If we look at the source or get_metadata(), we will find that, if $key is left empty, $single is ignored because of the following lines of code which comes before $single is applied if ( ! $meta_key ) { return $meta_cache; } So, in your usecase, $single … Read more