[wp-hackers] Get meta value with foreach

mailapera mailapera at gmail.com
Wed Aug 18 01:42:16 UTC 2010


I get this function to get a custom meta value for each post called by the
function, but for some reason the only output is the word "array" for each
post instance.

foreach ($my_posts as $post_id) {
            $p = get_post_meta($post_id, 'email', false);
            echo "$p";
        }

I don't get it


More information about the wp-hackers mailing list