Support » Plugins and Hacks » Radio Taxonomy » [Plugin: Radio Taxonomy] custom post types and Radio taxonomies

  • Resolved jakartadam

    (@jakartadam)


    The Plug in Radio taxonomies doesnt seem to work on custom post types. Or at least not for me. I have replaced the show_ui with radio and even tryed to replace the true with radio but I dont get any radio buttons.. am i missing something or is this plug in not designed for custom post types? If you could let me know how to set the custom post type taxonomy UI to radio buttons I would be very thankfull.

    http://wordpress.org/extend/plugins/radio-taxonomy/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Mitchell Bundy

    (@mitchbundy)


    Howdy

    This is meant for taxonomies, not post types, and should be used with register_taxonomy and not register_post_type

    An example would be, modified from the register_taxonomy codex page

    $labels = array(
        'name' => _x( 'Genres', 'taxonomy general name' ),
        'singular_name' => _x( 'Genre', 'taxonomy singular name' ),
        'search_items' =>  __( 'Search Genres' ),
        'all_items' => __( 'All Genres' ),
        'parent_item' => __( 'Parent Genre' ),
        'parent_item_colon' => __( 'Parent Genre:' ),
        'edit_item' => __( 'Edit Genre' ),
        'update_item' => __( 'Update Genre' ),
        'add_new_item' => __( 'Add New Genre' ),
        'new_item_name' => __( 'New Genre Name' ),
        'menu_name' => __( 'Genre' ),
      ); 	
    
      register_taxonomy('genre',array('book'), array(
        'hierarchical' => true,
        'labels' => $labels,
        'show_ui' => 'radio',
        'query_var' => true,
        'rewrite' => array( 'slug' => 'genre' ),
      ));

    Note the option 'show_ui' => 'radio'

    thanx so much.. that did it for me..

    hey,

    got one more question about this. I noticed that the add category link has diapeared.. is there a way to get that back?

    Regards

    Plugin Author Mitchell Bundy

    (@mitchbundy)


    That’s a good point there… It doesn’t look like it at the moment. I’ll patch that in a future release for sure.

    Oke.. thx anyway.. Ill redirect the user to the submenu then..

    regards

    ow.. I see that the submenu is also gone..

    well that makes it a bit hard to add a new category for the user..

    I thought I had it… sigh…

    Plugin Author Mitchell Bundy

    (@mitchbundy)


    The submenu should always be there, you just need to add the proper permissions for the user to add categories. Does the submenu appear when you login as admin?

    I have a custom post type. the sub menu in the left bar where all the taxonomies are placed so you can add or delete them will not show up when I set the UI to radio.. the plugin will set it to false.. I have tryed to change it in the plug in into true and sure enough it is showing up again.. but in the edit page the check box will also show up next to the radio pan.. if I select an other radio an publish it will only check the new value in the checkbox pan but unforrtunaly not uncheck the old one..

    if there would be a way to uncheck all the checkboxes first and then check the one that coresponts with the radio button that will do the trick.. unfortunaly Im relative new to wp and dont know how to get this done… then i just hide the checkboxes and we would be in business.. or use css to hide most of them and only leave the add category link.. that way you get best of both things..

    bit dirty but it would do the trick i guess..

    ow. yes I am admin

    Plugin Author Mitchell Bundy

    (@mitchbundy)


    I just made an update that should appear in the WordPress repository shortly. You should now be able to access the admin screen to manage the taxonomy properly. However, the “Add New Item” link on the posting page won’t be functional until a later release.

    Thx for your trouble.. much appriciated!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Plugin: Radio Taxonomy] custom post types and Radio taxonomies’ is closed to new replies.