How to retrieve elements from another table in a SQL query?
With a WP_Query() you can have all of them what you want in an easy way. See all the arguments available in the Codex. With the following code, we are grabbing all(-1) the posts from wp_posts table, and using the post ID we are grabbing the postmeta items. <?php $productquery = new WP_Query( array( ‘post_type’=>’wpcproduct’,’post_status’=>’publish’,’posts_per_page’=>-1 … Read more