• Resolved outhands

    (@outhands)


    I’ve been testing and trying to find where it possibly going wrong but i’m stuck on that part. The get_post_meta() is not returning any of my values, tested with a var_dump(get_post_meta(1)) this seems to return it, but when accessing that key var_dump(get_post_meta(1, ‘key_name’)) it’s returning a bool(false).

    Also the following way is not working for me, var_dump(get_post_meta(1, ‘key_name’, true)); as by default it’s false so checked this also. In my database the key 100% exists and has got values, also the ID is correct sending this.

    <?php 
        var_dump(get_post_meta(1));                // array(4)
        var_dump(get_post_meta(1,'key_name');      // array(1){[0]=>bool(false)}
        var_dump(get_post_meta(1,'key_name',true); // bool(false)
    ?>

    Is there something wrong with WordPress on this or am I missing something here, i’ve got a huge storage of data, could this be a problem for WordPress? Using the latest WordPress version available by download of www.remarpro.com.

Viewing 1 replies (of 1 total)
  • Thread Starter outhands

    (@outhands)

    Serialized data got corrupt, WordPress does not report you this on the core function get_post_meta().

Viewing 1 replies (of 1 total)
  • The topic ‘get_post_meta returns bool(false)’ is closed to new replies.