Is it possible to return taxonomy/term information for posts along with the posts themselves when querying with get_posts?
I have around 150 items I am querying so I don't want to loop and pull each individually.
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.Sign up to join this community
WordPress will cache all terms for taxonomies attached to all post types in the query result set by default - well, so long as you haven't set either
get_the_terms etc. within the loop will not hit the database. However,
wp_get_object_terms will hit the database as it by-passes WordPress' object cache.