Not working with custom taxonomies (plugin "Types" WP 4.2)
-
It’s not working with custom taxonomies defined with plugin “Types”, WordPress 4.2.2
I think it’s because it’s calling
get_taxonomies
ininitialize()
before custom ones are registered.WORKAROUND: calling
get_taxonomies
again inadmin_init()
:public function admin_init() { // call this here to get custom taxonomies $this->taxonomies = get_taxonomies(); if( ! is_array( $this->taxonomies) ) return; foreach( $this->taxonomies as $taxonomy ) { add_action( $taxonomy . '_add_form_fields' , array($this,'add_taxonomy_field') ); add_action( $taxonomy . '_edit_form_fields' , array($this,'edit_taxonomy_field') ); } }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Not working with custom taxonomies (plugin "Types" WP 4.2)’ is closed to new replies.