Admin Tool Bar Disappears with Custom Post Types

[ad_1]

Hello, everyone! I am creating custom post types with the functionality being stored in a mu-plugins directory inside of my wp-content directory.

my file custom-post-types.php has the following code:

<?php
function *custom\_post\_types*(){
*register\_post\_type*(‘show’, array(
‘public’ => true,
‘menu\_icon’ => ‘dashicons-calendar’,
‘labels’ => array(
‘name’ => ‘Shows’,
‘singular\_name’ => ‘Show’,
‘add\_new\_item’ => ‘Add New Show’,
‘edit\_item’ => ‘Edit Show’,
)
));
}
*add\_action*(‘init’, ‘custom\_post\_types’);
?>

When I create a new post and visit the permalink the WordPress Admin Tool bar from the top disappears. Is that something I need to include when registering a new post type? If not, what can I do to resolve this? Thanks!

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer