Skip to content

Instantly share code, notes, and snippets.

@keriat
Created August 16, 2019 07:51
Show Gist options
  • Save keriat/804ade232115f6880208f01388f05e3e to your computer and use it in GitHub Desktop.
Save keriat/804ade232115f6880208f01388f05e3e to your computer and use it in GitHub Desktop.
<?php
Fruitframe_PostType::add('news', [
'public' => true,
'exclude_from_search' => true,
'menu_icon' => 'dashicons-clock',
'menu_position' => 10,
'has_archive' => true,
'hierarchical' => false,
'taxonomies' => ['category', 'tag'],
'show_in_nav_menus' => true,
'rewrite' => true,
'show_in_rest' => true,
'supports' => [
'title',
'editor',
'excerpt',
'thumbnail'
]
], __('News', 'zdg'), __('News', 'zdg')
);
Fruitframe_PostType::add('video', [
'public' => true,
'exclude_from_search' => true,
'menu_icon' => 'dashicons-video-alt3',
'menu_position' => 11,
'has_archive' => true,
'hierarchical' => false,
'taxonomies' => ['category', 'tag'],
'show_in_nav_menus' => true,
'rewrite' => true,
'show_in_rest' => true,
'supports' => [
'title',
'editor',
'excerpt',
'thumbnail'
]
], __('Video', 'zdg'), __('Video', 'zdg')
);
Fruitframe_PostType::add('special', [
'public' => true,
'exclude_from_search' => true,
'menu_icon' => 'dashicons-microphone',
'menu_position' => 10,
'has_archive' => true,
'hierarchical' => false,
'taxonomies' => ['category', 'tag'],
'show_in_nav_menus' => true,
'rewrite' => true,
'show_in_rest' => true,
'supports' => [
'title',
'editor',
'excerpt',
'thumbnail'
]
], __('Special', 'zdg'), __('Specials', 'zdg')
);
Fruitframe_PostType::add('investigations', [
'public' => true,
'exclude_from_search' => true,
'menu_icon' => 'dashicons-archive',
'menu_position' => 11,
'has_archive' => true,
'hierarchical' => false,
'taxonomies' => ['category', 'tag'],
'show_in_nav_menus' => true,
'rewrite' => true,
'show_in_rest' => true,
'supports' => [
'title',
'editor',
'excerpt',
'thumbnail'
]
], __('Investigation', 'zdg'), __('Investigations', 'zdg')
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment