WordPress.org

Ready to get started?Download WordPress

Forums

Radio Taxonomy
[resolved] custom post types and Radio taxonomies (13 posts)

  1. jakartadam
    Member
    Posted 2 years ago #

    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/

  2. Mitchell Bundy
    Member
    Plugin Author

    Posted 2 years ago #

    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'

  3. jakartadam
    Member
    Posted 2 years ago #

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

  4. jakartadam
    Member
    Posted 2 years ago #

    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

  5. Mitchell Bundy
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  6. jakartadam
    Member
    Posted 2 years ago #

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

    regards

  7. jakartadam
    Member
    Posted 2 years ago #

    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...

  8. Mitchell Bundy
    Member
    Plugin Author

    Posted 2 years ago #

    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?

  9. jakartadam
    Member
    Posted 2 years ago #

    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..

  10. jakartadam
    Member
    Posted 2 years ago #

    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..

  11. jakartadam
    Member
    Posted 2 years ago #

    ow. yes I am admin

  12. Mitchell Bundy
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  13. jakartadam
    Member
    Posted 2 years ago #

    Thx for your trouble.. much appriciated!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic