White screen after adding custom post type support
-
Hi all,
I know this problem is mentioned 100 times before already as I have tried to find my answer before posting, but I’m getting too annoyed.
After adding some code to get a custom post type to the functions.php of my theme I’m creating, every time I’m updating a post, I get the white/blank screen.
I tried increasing the memory limit, I have NO plugins installed, and I even tried to setup a totally new and fresh wordpress installation, but same thing happens there.
When I switch to standard WP theme, there’s no problem. Same goes for removing the custom post type code, then everything suddenly works fine again. Don’t see anything bad in that code though.
The custom post type appears in the menu btw, so it does work.
Anyone has an idea? Thanks!!
add_action( 'init', 'create_post_type' ); function create_post_type() { register_post_type( 'festivals', array( 'labels' => array( 'name' => __( 'Festivals' ), 'singular_name' => __( 'Festival' ), 'add_new_item' => __('New festival'), 'add_new' => __('Add'), 'edit_item' => __('Edit festival'), 'new_item' => __('New festival'), 'all_items' => __('All festivals'), 'view_item' => __('View festival'), 'search_items' => __('Search festivals'), 'not_found' => __('No festivals found'), 'not_found_in_trash' => __('No festivals found in Trash'), 'parent_item_colon' => '', 'menu_name' => 'Festivals' ), 'public' => true, 'has_archive' => true, 'menu_position'=>5, ) ); }
The topic ‘White screen after adding custom post type support’ is closed to new replies.