I currently have a Multisite with 2 sites.
From the secondary site get_term_by()
works to retrieve terms from the primary site, but get_terms()
does not.
I'm using switch_to_blog(1);
but I get object(WP_Error)#1316 (2) { ["errors"]=> array(1) { ["invalid_taxonomy"]=> array(1) { [0]=> string(16) "Invalid taxonomy" } } ["error_data"]=> array(0) { } }
when I run get_terms()
Is there a way around this?