Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2021
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.20 KB | None | 0 0
  1. register_post_type('catalog', [
  2.         'label'  => null,
  3.         'labels' => [
  4.             'name'               => 'Catalog',
  5.             'singular_name'      => 'Product',
  6.             'add_new'            => 'Add new',
  7.             'add_new_item'       => 'Add new product',
  8.             'edit_item'          => 'Edit product',
  9.             'new_item'           => 'New product',
  10.             'view_item'          => 'View product',
  11.             'search_items'       => 'Find product',
  12.             'not_found'          => 'Products nof found',
  13.             'not_found_in_trash' => 'In basket product not found',
  14.             'parent_item_colon'  => '',
  15.             'menu_name'          => 'Catalog',
  16.         ],
  17.         'description'         => '',
  18.         'public'              => true,
  19.         'show_in_rest'        => true,
  20.         'hierarchical'        => false,
  21.         'supports'            => ['title', 'editor', 'thumbnail'],
  22.         'taxonomies'          => ['products'],
  23.         'has_archive'         => 'catalog',
  24.         'rewrite'             => [
  25.             'slug'         => 'catalog/%products%',
  26.             'with_front'   => false,
  27.         ],
  28.         'query_var'           => true,
  29.     ]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement