Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Custom Post Type Pages not Showing after 5.0 Update

$
0
0

Replies: 2

I’m not sure what code I need to show on here to see where the problem is. All of my custom post types (saved as must use plugins) worked before the 5.0 upgrade, even with Gutenberg. Now, today, the pages that have the custom post type shows up blank. There’s not even any body information in the browser inspector. What code would you need to see if I am missing something? Here’s one of them:

function rushmore_post_types() {
register_post_type( 'newsletter', array(
        'labels' => array(
		        'name' => 'Newsletters',
		        'singular_name' => 'Newsletter',
		        'add_new' => 'Add New',
		        'add_new_item' => 'Add New Newsletter',
		        'edit_item' => 'Edit Newsletter',
		        'new_item' => 'New Newsletter',
		        'view_item' => 'View Newsletter',
		        'search_items' => 'Search Newsletters',
		        'not_found' =>  'No Newsletters found',
		        'not_found_in_trash' => 'No Newsletters in the trash'
					),
					'menu_icon' => 'dashicons-format-aside',
        'public' => true,
				'show_ui' => true,
				'show_in_menu' => true,
				'show_in_nav_menus' => true,
				'show_in_rest' => true,
				'capability_type' => 'post',
				'supports' => array(
					'title',
					'editor',
				),
    ) );
	}
	add_action( 'init', 'rushmore_post_types' );

___
Edited to add:
I disabled all plugins (except for must use) and it still didn’t work. I changed the theme to 2019 and it worked there so it has to be something with my code.

  • This topic was modified 13 minutes ago by Marci.

Viewing all articles
Browse latest Browse all 59525

Trending Articles