Hi Pippin,
The custom post type is one I have created – it is very simple. The plugin just declares the custom post type and that is it.
This is the plugin:
function create_survey() {
register_post_type( ‘survey’,
array(
‘labels’ => array(
‘name’ => ‘Surveys’,
‘singular_name’ => ‘Survey’,
‘add_new’ => ‘Add New’,
‘add_new_item’ => ‘Add New Survey’,
‘edit’ => ‘Edit’,
‘edit_item’ => ‘Edit Survey’,
‘new_item’ => ‘New Survey’,
‘view’ => ‘View’,
‘view_item’ => ‘View Survey’,
‘search_items’ => ‘Search Surveys’,
‘not_found’ => ‘No Surveys found’,
‘not_found_in_trash’ => ‘No Surveys found in Trash’,
‘parent’ => ‘Parent Survey’
),
‘public’ => false,
‘publicly_queriable’ => false,
‘show_ui’ => true,
‘exclude_from_search’ => true,
‘show_in_nav_menus’ => false,
‘has_archive’ => false,
‘rewrite’ => false,
‘menu_position’ => 15,
‘supports’ => array( ‘title’, ‘editor’),
‘taxonomies’ => array( ” ),
‘menu_icon’ => ‘dashicons-clipboard’,
)
);
}
add_action( ‘init’, ‘create_survey’ );