I have a father blog / main blog inside a multisite that has a specific taxonomy with 20+ terms inside it. i just need a list of all the terms inside that taxonomy...
i dont mind quering using WPDB but just dont know to how to write it correctly or in any other way i tried use: "switch_to_blog" but that doesnt work when quering terms
Any suggestion?
i tried the: Multisite Global Terms plugin (doesnt work)...
EDIT (response to question in comment)
this is an example of switch_to_blog i tried:
function multisite_profession_select(){
switch_to_blog(1);
$taxonomies = array('rsitecat');
$args = array('hide_empty' => false);
$terms = get_terms($taxonomies, $args );
echo '<pre>';
print_r($terms);
echo '</pre>';
restore_current_blog();
}
The reponse i get:
WP_ERROR OBJECT
(
[ERRORS] => ARRAY
(
[INVALID_TAXONOMY] => ARRAY
(
[0] => INVALID TAXONOMY
)
)
[ERROR_DATA] => ARRAY
(
)
)