I am executing the following WP_Query on my mysql database:
$products = new WP_Query(array(
'post_type' => 'posts',
'meta_query' => array(
array(
'key' => 'meta_key',
'compare' => '=',
'value' => '_cegg_data_Amazon',
),
),
));
When I var_dump($product) I am receiving a long wp_Query object. However, I would only like to receive an object/list of the custom post fields. The below SQL query gives me exactly that back within phpmyadmin:
SELECT * FROM `wp_postmeta` where meta_key="_cegg_data_Amazon" ORDER BY `wp_postmeta`.`meta_key` ASC
Any suggestions how to get only the values of the custom fields _cegg_data_Amazon. I appreciate your replies!