Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am getting this message when I am trying to add a link to my menu:

screenshot

I have created a custom post type and a custom taxonomy

<?php
   /*
   Plugin Name: Portfolio - Custom Post Type
   Plugin URI: 
   Description: 
   Version: 1.0
   Author:
   Author URI: 
   License:
   */
?>
<?php

// ----- Register custom post type ------ //

add_action( 'init', 'create_post_type_portfolio' );

function create_post_type_portfolio() {
    $labels = array(
        'name'               => _x( 'Portfolios', 'post type general name' ),
        'singular_name'      => _x( 'Portfolio', 'post type singular name' ),
        'add_new'            => _x( 'Add New', 'job' ),
        'add_new_item'       => __( 'Add New Portfolio item' ),
        'edit_item'          => __( 'Edit Portfolio Item' ),
        'new_item'           => __( 'New Portfolio Item' ),
        'all_items'          => __( 'All Portfolio Items' ),
        'view_item'          => __( 'View Portfolio Item' ),
        'search_items'       => __( 'Search Portfolio Items' ),
        'not_found'          => __( 'No Portfolio Items found' ),
        'not_found_in_trash' => __( 'No Portfolio Items found in the Trash' ), 
        'parent_item_colon'  => '',
        'menu_name'          => 'Portfolio Items'
    );
    $args = array(
        'labels'        => $labels,
        'description'   => 'Holds our Portfolio Items and Portfolio Item specific data',
        'public'        => true,
        'menu_position' => 5,
        'menu_icon'     => plugins_url( 'portfolio.png', __FILE__ ),
        'supports'      => array( 'title', 'editor', 'thumbnail', 'excerpt', 'comments' ),
        'has_archive'   => true,
        'show_in_nav_menus' => true,
        'rewrite'       => true,
        'show_ui'       => true,

    );
    register_post_type( 'portfolio', $args );   
}

// ------------- register taxonomy ----------------- //

// hook into the init action and call create_portfolio_taxonomies when it fires
add_action( 'init', 'create_portfolio_taxonomies', 0 );

// create Work for the post type "portfolio"
function create_portfolio_taxonomies() {
    // Add new taxonomy, make it hierarchical (like categories)
    $labels = array(
        'name'              => _x( 'Work', 'taxonomy general name' ),
        'singular_name'     => _x( 'Work', 'taxonomy singular name' ),
        'search_items'      => __( 'Search Work' ),
        'all_items'         => __( 'All Work' ),
        'parent_item'       => __( 'Parent Work' ),
        'parent_item_colon' => __( 'Parent Work:' ),
        'edit_item'         => __( 'Edit Work' ),
        'update_item'       => __( 'Update Work' ),
        'add_new_item'      => __( 'Add New Work' ),
        'new_item_name'     => __( 'New Work Name' ),
        'menu_name'         => __( 'Work' ),
    );

    $args = array(
        'hierarchical'      => true,
        'labels'            => $labels,
        'show_ui'           => true,
        'show_admin_column' => true,
        'query_var'         => true,
        'show_in_nav_menus' => true,
        'rewrite'           => array( 'slug' => 'work' )
    );

    register_taxonomy( 'Work', array( 'portfolio' ), $args );
}



?>

Why ?

share|improve this question

closed as too localized by Rarst Jun 13 '13 at 16:25

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
I ran your code and I can't duplicate this. I do not see that box anywhere. Please try to provide more detail. What do you do-- step by step-- to make that box appear? –  s_ha_dum Jun 12 '13 at 15:46
    
who spoke about a box ? it's a custom post type and a custom taxonomy! –  RobDel Jun 12 '13 at 18:23
    
Your picture is of a meta box-- one associated with menus, it looks like-- and your description makes it seem like that box is related to question. –  s_ha_dum Jun 12 '13 at 18:26
    
As I said, "I am getting this message when I am trying to add a link to my menu". I suppose that this explains the rest, isnt't it ? This box is displayed when you add the custom taxonomy to a wordpress menu. –  RobDel Jun 12 '13 at 19:54
    
Got it, but can't figure out why. I'll answer if I work it out. –  s_ha_dum Jun 12 '13 at 20:37
show 1 more comment

1 Answer 1

up vote 0 down vote accepted

I have copied my plugin file to a new one .php file and deactivated the old one / activated the new one. Then everything worked successfully. I need to mention that I changed the names of the taxonomies from "Kind" to "Stuff" so I suppose there was an error or something in the database.

share|improve this answer
    
This seems to be caused by the first argument of register_taxonomy not being in "slug" form. I changed mine from "Topics" to "topic" and it worked. Cite: codex.wordpress.org/Function_Reference/register_taxonomy –  alpha1 Aug 21 '13 at 20:04
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.