Saturday, October 29, 2022
HomeWordPress DevelopmentCustomized submit varieties not exhibiting within the admin menu on manufacturing, however...

Customized submit varieties not exhibiting within the admin menu on manufacturing, however exhibits domestically


The issue I am going through is:

Domestically:
It exhibits all three customized submit varieties within the admin menu

Manufacturing:
It exhibits solely the primary two customized submit varieties within the admin menu

Has anybody else encountered this drawback? Can somebody level to me the place I am going fallacious? I am unable to determine the issue. Thanks.

<?php

operate theme_post_types() {
  // Occasion submit sort
  register_post_type('occasion', array(
    'show_in_rest' => true,
    'helps' => array('title', 'editor', 'excerpt'),
    'rewrite' => array('slug' => 'occasions'),
    'has_archive' => true, 
    'public' => true, // makes it seen to customers
    'labels' => array(
      'identify' => 'Occasions', // label within the dashboard
      'add_new_item' => 'Add New Occasion',
      'edit_item' => 'Edit Occasion',
      'all_items' => 'All Occasions',
      'singular_name' => 'Occasion'
    ),
    'menu_icon' => 'dashicons-calendar' // from https://developer.wordpress.org/useful resource/dashicons 
  ));
  
  // Professor submit sort
  register_post_type('professor', array(
    'show_in_rest' => true,
    'helps' => array('title', 'editor', 'thumbnail'),
    // 'rewrite' => array('slug' => 'professors'),
    // 'has_archive' => true,
    'public' => true, // makes it seen to customers
    'labels' => array(
      'identify' => 'Professors', // label within the dashboard
      'add_new_item' => 'Add New Professor',
      'edit_item' => 'Edit Professor',
      'all_items' => 'All Professors',
      'singular_name' => 'Professor'
    ),
    'menu_icon' => 'dashicons-businessperson' // from https://developer.wordpress.org/useful resource/dashicons 
  ));
  
  // movies submit sort
  register_post_type('video', array(
    'show_in_rest' => true,
    'helps' => array('title', 'editor', 'thumbnail'),
    // 'rewrite' => array('slug' => 'movies'),
    // 'has_archive' => true,
    'public' => true, // makes it seen to customers
    'labels' => array(
      'identify' => 'Movies', // label within the dashboard
      'add_new_item' => 'Add New Video',
      'edit_item' => 'Edit Video',
      'all_items' => 'All Movies',
      'singular_name' => 'Video'
    ),
    'menu_icon' => 'dashicons-video-alt3' // from https://developer.wordpress.org/useful resource/dashicons 
  ));
}

add_action('init', 'theme_post_types');

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments