Support » Fixing WordPress » Problems on including Custom Posts on Custom Menus

  • Hello everybody

    I’ve got problem on including a Custom Post into a Custom menu. Here’s the code of the costum post created:

    function create_product_post_type() {
    	register_post_type( 'products',
    			'labels' => array(
    				'name' => __( 'Prodotti' ),
    				'singular_name' => __( 'Prodotto' ),
    				'add_new' => __('Aggiungi nuovo', 'prodotto', 'your_text_domain'),
    				'add_new_item' => __('Aggiungi nuovo prodotto', 'your_text_domain'),
    				'edit_item' => __('Edit prodotto', 'your_text_domain'),
    				'new_item' => __('Nuovo prodotto', 'your_text_domain'),
    				'all_items' => __('Tutti i prodotti', 'your_text_domain'),
    				'view_item' => __('Guarda prodotto', 'your_text_domain'),
    				'search_items' => __('Cerca prodotti', 'your_text_domain'),
    				'not_found' =>  __('Nessun prodotto trovato', 'your_text_domain'),
    				'not_found_in_trash' => __('Nessun prodotto in Trash', 'your_text_domain'),
    				'parent_item_colon' => '',
    				'menu_name' => __('Prodotti', 'your_text_domain')
    		'public' => true,
            	'menu_position' => 5,
    		'rewrite' => array('slug' => 'prodotti'),
    		'can_export' => true,
    		'exclude_from_search' => false,
    		'has_archive' => false,
    		'hierarchical' => true,
    		'label' => 'Products',
    		'public' => true,
    		'publicly_queryable' => true,
    		'query_var' => 'products',
    		'show_ui' => true,
    		'show_in_menu' => true,
    		'show_in_nav_menus' => true,
    		'supports' => array ( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ),

    The Custom Post appear correctly on the Menu page, but when I select it and try to include in a Custom Menu, it shows a it tells me that it is “Not valid” as you can see in the picture below

    link img

    I also tried with a taxonomy created for the Custom Post, in order to select it and include it in the menu, but nothing changed, same problem.
    Any clue?


  • The topic ‘Problems on including Custom Posts on Custom Menus’ is closed to new replies.