The Simpler Way to Access Post Meta in WordPress

Last updated: June 2018

Access post meta the simple way. Forget trying to remember the complex get_post_meta() function, just use this instead:

$post->foo

Yup, it’s magic and I can’t believe I’ve just found out about it!

Credit: Ian Dunn