• Resolved ojasya

    (@ojasya)


    I have registered custom taxonomy “vendor-category”
    like this

    function tq_register_user_tax() {
    	register_taxonomy('vendor-category', ['user', 'post'], array(
    	    'public'      =>true,
    	    'single_value' => false,
    	    'show_admin_column' => true,
    	    'labels'      =>array(
    	        'name'                        =>'Vendor categories',
    	        'singular_name'               =>'Vendor category',
    	        'menu_name'                   =>'Vendor categories',
    	        'search_items'                =>'Search vendor categories',
    	        'popular_items'               =>'Popular vendor categories',
    	        'all_items'                   =>'All vendor categories',
    	        'edit_item'                   =>'Edit category',
    	        'update_item'             =>'Update category',
    	        'add_new_item'                =>'Add new vendor category',
    	        'new_item_name'               =>'New vendor category name',
    	        'add_or_remove_items'     =>'Add or remove categories',
    	        'choose_from_most_used'       =>'Choose from the most popular categories',
    	    ),
    		'hierarchical' => true,
    	    'rewrite'     => array(
    	        'with_front'              => false,
    	        'slug'                        =>'vendor-category',
    	    ),
    	    'capabilities'    => array(
    	        'manage_terms'                =>'edit_users',
    	        'edit_terms'              =>'edit_users',
    	        'delete_terms'                =>'edit_users',
    	        'assign_terms'                =>'read',
    	    ),
    	));
    }
    
    add_action( 'init' , 'tq_register_user_tax' );

    Initially it was registered just for the “user” then no SEO settings, description were appearing for taxonomy “vendor_cateogory”

    But then I modified the code a bit to enabled this taxonomy for ‘post’ as well then I can see the SEO setttings
    https://tinyurl.com/27yqpmal
    and it works
    but problems are

    1) if Robots Meta Settings for this term is left to – default(index) even then on from end term is noindex
    2) there are no information in SEO column here https://tinyurl.com/2b8rckmc

    but as and when I register this taxonomy only for POST then everything seem to work fine

    SO is there anything we can make all features of the SEO plugin to work perfect even if taxonomy is registered for “user” or perhaps only “user and not post”

    looking forward for the help

    Thanks

    • This topic was modified 9 months, 4 weeks ago by ojasya.
Viewing 1 replies (of 1 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hello!

    “user” is not a built-in WordPress post type. I assume there’s more code to this?

    Perhaps TSF considers the “user” post type incompatible and will deem the taxonomy incompatible, too. Since the “post” post type’s compatibility is forced, TSF will always consider attached publicly hierarchical taxonomies compatible.

    Here’s the code that determines this: https://github.com/sybrew/the-seo-framework/blob/5.0.4/inc/classes/helper/taxonomy.class.php#L69-L75. Further below, line 116 uses this to determine a taxonomy supported.

    Could you share the code for the “user” post type? This can help me replicate the issue. Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘SEO Settings Missing for custom Taxonomy’ is closed to new replies.