[wp-hackers] get_post_meta returns empty meta_value

William P. Davis will.davis at gmail.com
Fri Aug 19 04:59:12 UTC 2011

Is it possible there are multiple meta entries in the DB? For example, you can have two meta entries with the same key and the same value, and unless you tell the function to return all it will pick one. 

------Original Message------
From: Jeff Rose
Sender: wp-hackers-bounces at lists.automattic.com
To: wp-hackers at lists.automattic.com
ReplyTo: wp-hackers at lists.automattic.com
Subject: [wp-hackers] get_post_meta returns empty meta_value
Sent: Aug 19, 2011 12:08 AM

Having a small problem with get_post_meta all of a sudden, and I hope
someone can help.

It's returning the meta_value empty, when it shouldn't. The post_id and
meta_key return correctly, so it finds the DB record.
I've grabbed the last_query and run it manually in the DB and it returns a
full result, so it "shouldn't" be a DB or query problem.

Quite frankly, I'm stumped. Anybody seen this before?

WP 3.0.5 (intentionally in one development environment)

Jeff Rose
wp-hackers mailing list
wp-hackers at lists.automattic.com

Sent from my BlackBerry® wireless device

More information about the wp-hackers mailing list