WordPress.org

Ready to get started?Download WordPress

Forums

CPT-onomies: Using Custom Post Types as Taxonomies
Taxonomy Selection Greyed Out (using hard coded custom post type) (1 post)

  1. digitalduet
    Member
    Posted 6 months ago #

    Hi I'm trying to convert a hardcoded custom post type in my theme to a taxonomy and whenever I try to use it I find the taxonomy selection box is greyed out, in addition I noticed that when I save the CPT-Onomy it does not save the state of the settings for: "Meta Box Format", "Show Admin Column" and "Archive Page Slug"

    It works fine however if i use a custom post type created with CPT-Onomy...

    It is critical that I hardcode the custom post type for this purpose...

    Here is the creation code for my custom post type:

    function create_specialist_division_post_type()
    {
    $labels = array(
    'name' => __( 'Specialist Division', 'dd'),
    'singular_name' => __( 'Specialist Division', 'dd' ),
    'add_new' => __('Add New', 'dd'),
    'add_new_item' => __('Add New Specialist Division', 'dd'),
    'edit_item' => __('Edit Specialist Division', 'dd'),
    'new_item' => __('New Specialist Division', 'dd'),
    'view_item' => __('View Specialist Division', 'dd'),
    'search_items' => __('Search Specialist Division', 'dd'),
    'not_found' => __('No Specialist Division found', 'dd'),
    'not_found_in_trash' => __('No Specialist Division found in Trash', 'dd'),
    );

    $args = array(
    'labels' => $labels,
    'public' => true,
    'exclude_from_search' => true,
    'publicly_queryable' => true,
    'show_ui' => true,
    'query_var' => true,
    //'menu_icon' => get_template_directory_uri() . '/library/img/agent-icon_16.png',
    'capability_type' => 'post',
    'has_archive' => true,
    'hierarchical' => false,
    'menu_position' => 8,
    'supports' => array('title','editor','thumbnail','custom-fields','page-attributes',''),
    'rewrite' => array( 'slug' => __('specialist_division', 'dd') )
    );

    register_post_type('specialist-division',$args);
    }

    add_action( 'init', 'create_specialist_division_post_type' );

    Many Thanks

    http://wordpress.org/plugins/cpt-onomies/

Reply

You must log in to post.

About this Plugin

About this Topic