bloqhead
10/5/2013 - 3:14 PM

Simple WordPress custom post type example.

Simple WordPress custom post type example.

<?php
register_post_type( 'projects',
    array(
        'labels' => array(
            'name' => __( 'Projects' ),
            'singular_name' => __( 'Project' ),
            'add_new' => __( 'Add Project' ),
            'add_new_item' => __( 'Add a Project' )
        ),
        'public' => true,
        'has_archive' => true,
        'supports' => array (
            'title',
            'thumbnail',
            'page-attributes',
            'editor'
            ),
    )
);
?>