add_action( 'init', 'create_post_type' );
function create_post_type() {
register_post_type( 'testimonial',
array(
'labels' => array(
'name' => __( 'Testimonials' ),
'singular_name' => __( 'Testimonial' )
),
'public' => true,
'has_archive' => true,
'supports' => array(
'title',
'editor',
'thumbnail',),
)
);
}
A simple function which allows you to declare your own post type
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.