• [ Moderator note: moved to Fixing WordPress. ]

    Hello!
    I have overtaken a website which has a lot of posts, and due to an outdated look and feel of the website I’m trying to export/import the post ta new wp with a new Theme.
    However I have a lot of failing imports like this “Failed to import type Dokumentation”. In the original WP there’s a custom post type called “librarypost” (Menu name is Poster, swedish for posts) a bit confusing right? Anyway I switched to english admin and I see I have “Posts” which the default WP posts, and “Poster” which is the Custom Post type. Under the Posts and Poster menu I have the default options, All posts, Add New, Categories, Tags. But I also have a custom option called Typer (Types in english) which somewhat looks like second level categories option. So when I edit a post in “Poster” or “Posts” I get to choose what categories it’s in, but also, further down I have “Typer” (Types trans) and that’s why the imports keeps failing. There are about 11000 posts which categories and “typer” assigned to them, and doing this manually would be a pain in my **ss. Any ideas how to get around this?

    • This topic was modified 7 years, 8 months ago by bjoeri.
    • This topic was modified 7 years, 8 months ago by Jan Dembowski.
Viewing 1 replies (of 1 total)
  • Thread Starter bjoeri

    (@bjoeri)

    Found this code in a file called register.php which is a part of the old theme, and I guess is a custom built theme.

    // Typer
    	$labels = array(
    		'name' => 'Typer',
    		'singular_name' => 'typ',
    		'add_new' => 'L?gg till ny',
    		'add_new_item' => 'L?gg till ny typ',
    		'edit_item' => 'Redigera typ',
    		'new_item' => 'Ny typ',
    		'view_item' => 'Visa typ',
    		'search_items' => 'S?k typer',
    		'not_found' =>  'Inga typer hittades',
    		'not_found_in_trash' => 'Inga typer hittades i soptunnan',
    		'parent_item_colon' => 'F?r?lder-typ:'
    	);
    
    	register_taxonomy('type',array('post','librarypost'), array(
    		'hierarchical' => true,
    		'labels' => $labels,
    		'capability_type' => 'adminstuff',
    		'query_var' => 'typ',
    		'rewrite' => array( 'slug' => 'typ', 'with_front' => false),
    ));
Viewing 1 replies (of 1 total)
  • The topic ‘Custom post types issue/Import fails/Unknown type’ is closed to new replies.