Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Custom Post Type UI Taxonomy Error? WordPress

  • SOLVED

I am using the Custom Post Type UI plugin to register custom post types and taxonomies

I have registered 'carpet' as a custom post type and attached the taxonomy 'Style' to it.

When I click on the 'style' taxonomy link from the WP dashboard, I get the following error:

<em>Notice: Trying to get property of non-object in /home3/chicahk3/public_html/wp-admin/edit-tags.php on line 12</em>

Here are the screenshots:
When I click on 'Style'
[[LINK href="http://www.cl.ly/3e2A0l3g072g3O2I0X1E"]]http://www.cl.ly/3e2A0l3g072g3O2I0X1E[[/LINK]]

I get this error
[[LINK href="http://www.cl.ly/1u1a2Q262P340O3G1k3u"]]http://www.cl.ly/1u1a2Q262P340O3G1k3u[[/LINK]]

Additionally, I am getting error on my gravity form where I am have taxonomy fields

Here is the form where errors occur: [[LINK href="http://66.147.244.249/~chicahk3/add-product-form/"]]http://66.147.244.249/~chicahk3/add-product-form/[[/LINK]]

I am thinking that these errors are related...any ideas to what is going on?

Answers (2)

2011-06-16

Christianto answers:

Hi Patrick,

What happen if you deactivate the plugin and register the custom post type manually?

put on your functions.php

function carpet_init(){
// post type
$labels = array(
'name' => 'carpets',
'singular_name' => 'carpet',
'add_new' => 'Add carpet',
'add_new_item' => 'Add New carpet',
'edit' => 'Edit',
'edit_item' => 'Edit carpet',
'new_item' => 'New carpet',
'view_item' => 'View carpet',
'search_items' => 'Search carpets',
'not_found' => 'No carpets Found',
'not_found_in_trash' => 'No carpets Found in Trash',
'parent_item_colon' => '',
'menu_name' => 'carpets'
);
$args = array(
'label' => 'carpets',
'labels' => $labels,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'capability_type' => 'post',
'has_archive' => true,
'rewrite' => array('slug' => ''),
'hierarchical' => true,
'supports' => array('title','editor','excerpt','trackbacks','custom-fields','comments','revisions','thumbnail','author','page-attributes'),
'taxonomies' => array('style')
);
register_post_type('carpet',$args);

// taxonomy example
// uncomment if needed

$labels = array(
'name' => 'style',
'singular_name' => 'style Category',
'search_items' => __( 'style Categories' ),
'all_items' => __( 'All style Categories' ),
'parent_item' => __( 'Parent style Category' ),
'parent_item_colon' => __( 'Parent style Category:' ),
'edit_item' => __( 'Edit style Category' ),
'update_item' => __( 'Update style Category' ),
'add_new_item' => __( 'Add New style Category' ),
'new_item_name' => __( 'New style Category Name' ),
'menu_name' => __( 'Style' )
);

register_taxonomy(
'style',
array('carpet'),
array(
'hierarchical' => true,
'labels' => $labels,
'show_ui' => true,
'query_var' => true,
'rewrite' => true,
)
);

}
add_action('init', 'carpet_init');

2011-06-17

Jacob van Zijp answers:

Maybe you can use this plugin: http://wordpress.org/extend/plugins/gravity-forms-custom-post-types/ instead. Seems to be working very well.