Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wordpress register post type

function book_setup_post_type() {
    $args = array(
        'public'    => true,
        'label'     => __( 'Books', 'textdomain' ),
        'menu_icon' => 'dashicons-book',
    );
    register_post_type( 'book', $args );
}
add_action( 'init', 'book_setup_post_type' );
Source by developer.wordpress.org #
 
PREVIOUS NEXT
Tagged: #wordpress #register #post #type
ADD COMMENT
Topic
Name
3+6 =