Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter neand

    (@neand)

    I finally found the culprit, I noticed that /wp-json/wp/v2/taxonomies was working but did not list the taxonomies registered with CPTUI. I finally found that this was caused by a small function in the mu-plugin directory which disactivated some plugins under certain conditions, including CPTUI…
    Thank you very much for your help!

    Thread Starter neand

    (@neand)

    Hi @tw2113

    Here is what I have in the Tools menu for the posts:

    {"news":{"name":"news","label":"\u304a\u77e5\u3089\u305b","singular_label":"\u304a\u77e5\u3089\u305b","description":"","public":"true","publicly_queryable":"true","show_ui":"true","show_in_nav_menus":"true","delete_with_user":"false","show_in_rest":"true","rest_base":"","rest_controller_class":"","has_archive":"true","has_archive_string":"","exclude_from_search":"false","capability_type":"post","hierarchical":"true","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"","supports":["title","editor","thumbnail","excerpt","author"],"taxonomies":["news_cat"],"labels":{"all_items":"\u5168\u8a18\u4e8b\u3092\u95b2\u89a7","add_new":"\u65b0\u898f\u4f5c\u6210","menu_name":"","add_new_item":"","edit_item":"","new_item":"","view_item":"","view_items":"","search_items":"","not_found":"","not_found_in_trash":"","parent_item_colon":"","featured_image":"","set_featured_image":"","remove_featured_image":"","use_featured_image":"","archives":"","insert_into_item":"","uploaded_to_this_item":"","filter_items_list":"","items_list_navigation":"","items_list":"","attributes":"","name_admin_bar":"","item_published":"","item_published_privately":"","item_reverted_to_draft":"","item_scheduled":"","item_updated":""},"custom_supports":""},"technews":{"name":"technews","label":"\u6280\u8853\u60c5\u5831","singular_label":"\u6280\u8853\u60c5\u5831","description":"","public":"true","publicly_queryable":"true","show_ui":"true","show_in_nav_menus":"true","delete_with_user":"false","show_in_rest":"true","rest_base":"","rest_controller_class":"","has_archive":"true","has_archive_string":"","exclude_from_search":"false","capability_type":"","hierarchical":"true","rewrite":"false","rewrite_slug":"","rewrite_withfront":"false","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"dashicons-admin-tools","supports":["title","editor","thumbnail","excerpt","author"],"taxonomies":["tech_cat"],"labels":{"all_items":"\u5168\u8a18\u4e8b\u3092\u95b2\u89a7","add_new":"\u65b0\u898f\u4f5c\u6210","menu_name":"","add_new_item":"","edit_item":"","new_item":"","view_item":"","view_items":"","search_items":"","not_found":"","not_found_in_trash":"","parent_item_colon":"","featured_image":"","set_featured_image":"","remove_featured_image":"","use_featured_image":"","archives":"","insert_into_item":"","uploaded_to_this_item":"","filter_items_list":"","items_list_navigation":"","items_list":"","attributes":"","name_admin_bar":"","item_published":"","item_published_privately":"","item_reverted_to_draft":"","item_scheduled":"","item_updated":""},"custom_supports":""}}

    And for the taxonomies:

    {"news_cat":{"name":"news_cat","label":"\u30ab\u30c6\u30b4\u30ea\u30fc\uff08\u30cb\u30e5\u30fc\u30b9\uff09","singular_label":"\u30ab\u30c6\u30b4\u30ea\u30fc\uff08\u30cb\u30e5\u30fc\u30b9\uff09","description":"","public":"true","publicly_queryable":"true","hierarchical":"true","show_ui":"true","show_in_menu":"true","show_in_nav_menus":"true","query_var":"true","query_var_slug":"","rewrite":"true","rewrite_slug":"","rewrite_withfront":"1","rewrite_hierarchical":"0","show_admin_column":"false","show_in_rest":"true","show_in_quick_edit":"","rest_base":"","rest_controller_class":"","labels":{"menu_name":"","all_items":"","edit_item":"","view_item":"","update_item":"","add_new_item":"","new_item_name":"","parent_item":"","parent_item_colon":"","search_items":"","popular_items":"","separate_items_with_commas":"","add_or_remove_items":"","choose_from_most_used":"","not_found":"","no_terms":"","items_list_navigation":"","items_list":""},"meta_box_cb":"","object_types":["news"]},"tech_cat":{"name":"tech_cat","label":"\u696d\u754c","singular_label":"\u696d\u754c","description":"","public":"true","publicly_queryable":"true","hierarchical":"true","show_ui":"true","show_in_menu":"true","show_in_nav_menus":"true","query_var":"true","query_var_slug":"","rewrite":"true","rewrite_slug":"","rewrite_withfront":"1","rewrite_hierarchical":"0","show_admin_column":"false","show_in_rest":"true","show_tagcloud":"false","show_in_quick_edit":"","rest_base":"","rest_controller_class":"WP_REST_Terms_Controller","labels":{"menu_name":"","all_items":"","edit_item":"","view_item":"","update_item":"","add_new_item":"","new_item_name":"","parent_item":"","parent_item_colon":"","search_items":"","popular_items":"","separate_items_with_commas":"","add_or_remove_items":"","choose_from_most_used":"","not_found":"","no_terms":"","items_list_navigation":"","items_list":"","back_to_items":""},"meta_box_cb":"","default_term":"","object_types":["technews"]}}

    (sorry for all the unicode names)

    POST to wp-json/wp/v2/posts/300?_locale=user work fine, but
    GET to wp-json/wp/v2/news_cat, or POST to wp-json/wp/v2/news/200?_locale=user don’t…

    Thank you for your help!

Viewing 2 replies - 1 through 2 (of 2 total)