This is a slightly deferred answer, but it was first on Google for βposts related to WordPress in a few terms,β so I thought I made my conclusions.
Since this question was published, Wordpress was modified to allow this type of request. This will give you a list of messages associated with any custom taxonomy term assigned to the object:
$post_cats = wp_get_object_terms(get_the_ID(), 'video_category', array('fields' => 'ids')); $args=array( "tax_query" => array( array( "taxonomy" => "video_category", "field" => "id", "terms" => $post_cats ) ), 'post__not_in' => array(get_the_ID()), 'post_type' => 'video', 'posts_per_page' => 8, 'caller_get_posts' => 1 ); $related_by_cats = new WP_Query($args);
This is my first contribution to SO, I hope it complies with the standards.
source share