get_terms invalid taxonomy
-
In my theme functions.php I have this code:
$menus = get_terms( 'nav_menu', array( 'hide_empty' => true ) );
and it works great.
I have the same code in a plugin and it says this:
object(WP_Error)#1096 (2) { ["errors"]=> array(1) { ["invalid_taxonomy"]=> array(1) { [0]=> string(16) "Invalid taxonomy" } } ["error_data"]=> array(0) { } }
Why would context matter? And what can I do about it?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘get_terms invalid taxonomy’ is closed to new replies.