Bug fix for undefined variable notice in CPT-onomies 1.1.1

CPT-onomies WordPress Plugin by Rachel Carden enables you to use your custom post types as taxonomies and create relationships between your posts by using custom post type post titles as taxonomy terms, in a similar fashion as you would create taxonomy relationships.

Since it is not yet possible to create relationships between custom post types like that with WordPress, out of the box, I am using CPT-onomies v1.1.1 for a project that I’m presently working on.

While playing around, I stumbled across a bug which introduced a debug notice in the WordPress dashboard and didn’t let me publish or update posts for those custom post types which used a cpt-onomy (custom post type as a taxonomy). I reported it to Rachel and she responded quickly with a fix.

CPT-onomies v1.1.1 bug

Until a new version of the plugin comes out with the fix, to get rid of the debug ‘Notice’, you can change line 931 of manager.php in the plugin root directory from:

'cpt_onomy_archive_slug' => ( isset( $cpt_settings[ 'cpt_onomy_archive_slug' ] ) && !empty( $cpt_settings[ 'cpt_onomy_archive_slug' ] ) ) ? $cpt[ 'cpt_onomy_archive_slug' ] : NULL );


'cpt_onomy_archive_slug' => ( isset( $cpt_settings[ 'cpt_onomy_archive_slug' ] ) && !empty( $cpt_settings[ 'cpt_onomy_archive_slug' ] ) ) ? $cpt_settings[ 'cpt_onomy_archive_slug' ] : NULL );

This will remove the notice and you’ll be able to publish or update posts of custom post types which use a cpt-onomy without a hassle.