Skip to content

Instantly share code, notes, and snippets.

@BronsonQuick
Last active May 31, 2016 05:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BronsonQuick/1c40a4235da79360f3fb59f69accfdb4 to your computer and use it in GitHub Desktop.
Save BronsonQuick/1c40a4235da79360f3fb59f69accfdb4 to your computer and use it in GitHub Desktop.
$taxonomies = Fusion()->get_content_taxonomies();
foreach ( $taxonomies as $taxonomy ) {
$tax_query['tax_query'][] = array(
'field' => 'term_id',
'terms' => $tags,
'taxonomy' => $taxonomy,
);
}
$tax_query['tax_query']['relation'] = 'OR';
$tax_query['posts_per_page'] = $requested_posts;
$tax_query['post_type'] = Fusion()->get_content_post_types();
$related_content = new WP_Query( $tax_query );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment