Closed sandrodz closed 7 years ago
You can use get_post_meta( get_the_ID(), 'gift_order_status', true )
from within your call back function to get the meta value. This won't cause any extra database queries because it gets pre-cached by WordPress when the posts are fetched.
No need. I did following:
I want following logic: a. if status = 0 display
created
b. if status = 1 displayclaimed
I want to use callback function as stated in docs, but Wiki says that I need to use global $post here, seems excessive to do all the postmeta query manually. Is there a better way?