Last active
May 31, 2016 05:18
-
-
Save BronsonQuick/1c40a4235da79360f3fb59f69accfdb4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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