Looking for a way to include custom fields in the output of WP_Query. I am managing a site where nearly every post type has a lot of custom fields defined and it would be much nicer not to have to run get_post_custom in almost every loop.
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
You may want to hook somewhere in the gazillion hooks available in I would suggest something like this:
In this way you will always have your posts custom fields at hand in your |
|||
|
|
|
|
|||
|
|