Display posts/pages



<?php
 $args = array('numberposts' => '50', 'offset' => '',
 'category' => 'product_type', 'orderby' => 'post_date',
 'order' => 'DESC',
 'include' => '', 'exclude' => '',
 'meta_key' => '','meta_value' => '',
 'post_type' => 'product', 'post_mime_type' => '', 'post_parent' => '',
 'post_status' => 'publish', 'suppress_filters' => true
 );
 $products = get_posts($args);
 foreach($products as $product) {
 echo $product->post_title; // display product title
 echo get_the_post_thumbnail( $product->ID); // display product image
 echo $product->post_content; // display product description
 }
?>

terms, taxonomy, relationships in wp



little bit of conclusion
wp_terms_taxonomy strutured in this manner:
 1) term_taxonomy_id - category id
 2) term_id - FK->wp_terms.term_id,
 3) taxonomy - eg) category = one of the taxonomy type
 4) description of category
 5) parent 0 if it is parent,
 else any term_taxonomy_id of the main category
 6) count total posts under current category
wp_terms strutured in this manner:
 1) term_id (auto_increment)
 2) name - name of the category
 3) slug - slug of the category
 4) term_group - term with multiple aliases.This feature doesn't seem to be
 fully backed and is therefore practically never used
wp_term_relationships strutured in this manner:
 1) object id - ID of a post or link
 2) term_taxonomy_id - FK->wp_term_taxonomy.term_taxonomy_id
 3) term_order - order of the terms - categories