Created
July 8, 2024 10:54
-
-
Save MakarandMane/944ae89fa0087322d83bf8468e3d7452 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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