Skip to content

Instantly share code, notes, and snippets.

@MakarandMane
Created July 8, 2024 10:54
Show Gist options
  • Save MakarandMane/944ae89fa0087322d83bf8468e3d7452 to your computer and use it in GitHub Desktop.
Save MakarandMane/944ae89fa0087322d83bf8468e3d7452 to your computer and use it in GitHub Desktop.
<?php
/**
* Plugin Name: Team Members
* Plugin URI: PLUGIN SITE HERE
* Description: PLUGIN DESCRIPTION HERE
* Author: YOUR NAME HERE
* Author URI: YOUR SITE HERE
* Text Domain: team-members
* Domain Path: /languages
* Version: 0.1.0
*
* @package Team_Members
*/
// Your code starts here.
// include plugin_dir_path( __FILE__ ) ."post-types/team.php";
add_action( 'init', 'team_post_type' );
function team_post_type(){
register_post_type('team',
array(
'labels' => array(
'name' => __('Teams', 'team-members'),
'singular_name' => __('Team', 'team-members'),
),
'public' => true,
'has_archive' => true,
'supports' => array('title', 'comments', 'thumbnail') ,
)
);
register_taxonomy(
'department',
'team',
array(
'hierarchical' => true,
)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment