Support » Fixing WordPress » Custom Post type: Labels are not showing in WordPress

  • Resolved warda khan


    I created custom-post-type.php file in folder of mu-plugins:

    function custom_post_types(){
        register_post_type('event', array(
            'public' => true,
            'labels' => array(
                'name' => 'Events',
                'add_new'=> 'Edit Event',
                'edit_item' => 'Add New Event'
            'menu_icon' => 'dashicons-calendar'
      add_action('init', 'custom_post_types');

    These two labels name of 'add_new'=> 'Edit Event', & 'edit_posts' => 'Add New Event'not working. I wanted to know where i am mistaken. Can somebody help? Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter warda khan


    i started in functions.php and moved the code in mu-plugins by changing the name of the university-post-types to custom_post_types. if this is creating problem then what is the solution for now on?

    Thread Starter warda khan


    solved. i moved the code from functions.php to mu-plugins. this is all causing issue of becuse i rename the file and functions name

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.