From 0bd77ff9e8488b8e8a3bb0bebaba433b8050056d Mon Sep 17 00:00:00 2001 From: im3dabasia Date: Thu, 21 May 2026 13:44:27 +0530 Subject: [PATCH 1/2] Fix: Taxonomy not showing in the settings panel in editor --- lib/experimental/content-types/index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/experimental/content-types/index.php b/lib/experimental/content-types/index.php index 02f160fec2b96b..e1ea0de6527c73 100644 --- a/lib/experimental/content-types/index.php +++ b/lib/experimental/content-types/index.php @@ -462,4 +462,6 @@ function gutenberg_register_user_defined_taxonomies() { register_taxonomy( $slug, $object_type, $args ); } } -add_action( 'init', 'gutenberg_register_user_defined_taxonomies', 20 ); +// Priority 21 — after gutenberg_register_user_defined_post_types() (priority 20) +// so user CPT slugs exist when register_taxonomy() records the object_type association. +add_action( 'init', 'gutenberg_register_user_defined_taxonomies', 21 ); From d1e858451600d4560e73b16c284a8298892b75f4 Mon Sep 17 00:00:00 2001 From: im3dabasia Date: Mon, 25 May 2026 12:28:39 +0530 Subject: [PATCH 2/2] fix: Feedbacks added --- lib/experimental/content-types/index.php | 4 ++-- lib/experimental/content-types/post-types.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/experimental/content-types/index.php b/lib/experimental/content-types/index.php index e1ea0de6527c73..dbf30b8e0e87f3 100644 --- a/lib/experimental/content-types/index.php +++ b/lib/experimental/content-types/index.php @@ -462,6 +462,6 @@ function gutenberg_register_user_defined_taxonomies() { register_taxonomy( $slug, $object_type, $args ); } } -// Priority 21 — after gutenberg_register_user_defined_post_types() (priority 20) +// Priority 25 — after gutenberg_register_user_defined_post_types() (priority 20) // so user CPT slugs exist when register_taxonomy() records the object_type association. -add_action( 'init', 'gutenberg_register_user_defined_taxonomies', 21 ); +add_action( 'init', 'gutenberg_register_user_defined_taxonomies', 25 ); diff --git a/lib/experimental/content-types/post-types.php b/lib/experimental/content-types/post-types.php index c6a0ff82137c7b..8b715e9d8321d3 100644 --- a/lib/experimental/content-types/post-types.php +++ b/lib/experimental/content-types/post-types.php @@ -304,4 +304,6 @@ function gutenberg_register_user_defined_post_types() { register_post_type( $slug, $args ); } } +// Priority 20 — must run before gutenberg_register_user_defined_taxonomies() (priority 25) +// so user CPT slugs exist when register_taxonomy() records the object_type association. add_action( 'init', 'gutenberg_register_user_defined_post_types', 20 );