I'm attempting to pull in related content according to matching custom taxonomy the current publish with hierarchical terms labeled with other content(each one is same taxonomies).

So, whenever a customer is searching in a "Product", you will see terms connected with this product. Maybe: carpeting >> synthetics >> polyester for the reason that hierarchical order.

This specific hierarchical taxonomy is "product_type_material" towards the WordPress system. I began off simply by obtaining the terms connected using the current publish/product and matching the entire group of terms at the same time such as this:

    // get current post terms
    $product_types_materials = get_the_terms($post->ID, 'product_type_material');
    foreach($product_types_materials as $type_material)
           // format terms for query
       $type_material_terms .= $type_material->slug . ", ";

    // match products with the same set of terms
    new WP_query("post_type=products&orderby=rand&posts_per_page=1&product_type_material=$type_material_terms");

Since labored fine, but regrettably I want a far more granular method of matching related content. Essentially, I have to see if any of the current publish terms, match anyone term of the product.

Is possible with WordPress techniques, or shall we be held searching in a custom MySQL query, or shall we be held just crazy? A good push within the right direction could be very useful at this time.