Last active
April 18, 2018 06:41
-
-
Save yasaryousuf/8e4284c1298c2eed215d5db13ffddc6f to your computer and use it in GitHub Desktop.
wordpress custom post type
This file contains hidden or 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 | |
# Custom Post Type | |
function registration_post_types() | |
{ | |
$args = array( | |
'labels' => array( | |
'name' => __( 'Registrations' ), | |
'singular_name' => __( 'Registration' ) | |
), | |
'public' => true, | |
'show_ui' => true, | |
'menu_position' => 5, | |
'menu_icon' => 'dashicons-video-alt', | |
); | |
register_post_type( 'registration', $args ); | |
} | |
add_action( 'init', 'registration_post_types' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment