Tag Info

Hot answers tagged

5

By default, WP_Query returns the standard WP_Post objects for the posts being queried. I believe with some clever rewrite and use of the filters given in WP_Query you can add objects to the returned WP_Post objects array. Will this be performant. In my opinion, I will hurt performance more as you will need to join results in your query as custom fields are ...


1

You can print the values of the array like this: $colors = get_post_meta($post->ID, $prefix . 'colors', true); foreach($colors as $color){ echo $color; }



Only top voted, non community-wiki answers of a minimum length are eligible