Current File : /home/kelaby89/sergio-cuchi.tattoo/wp-content/plugins/maori-features/artists.php
<?php
function register_maori_artists_posttype() {
    $labels = array(
        'name'              => esc_attr__( 'Artists', 'maori' ),
        'singular_name'     => esc_attr__( 'Artist', 'maori' ),
        'add_new'           => esc_attr__( 'Add new artist', 'maori' ),
        'add_new_item'      => esc_attr__( 'Add new artist', 'maori' ),
        'edit_item'         => esc_attr__( 'Edit artist', 'maori' ),
        'new_item'          => esc_attr__( 'New artist', 'maori' ),
        'view_item'         => esc_attr__( 'View artist', 'maori' ),
        'search_items'      => esc_attr__( 'Search artists', 'maori' ),
        'not_found'         => esc_attr__( 'No artist found', 'maori' ),
        'not_found_in_trash'=> esc_attr__( 'No artist found in trash', 'maori' ),
        'parent_item_colon' => esc_attr__( 'Parent artist:', 'maori' ),
        'menu_name'         => esc_attr__( 'Artists', 'maori' )
    );

    $taxonomies = array();
 
    $supports = array('title','thumbnail','editor','excerpt');
 
    $post_type_args = array(
        'labels'            => $labels,
        'singular_label'    => esc_attr__('artists', 'maori'),
        'public'            => true,
        'exclude_from_search' => true,
        'show_ui'           => true,
        'show_in_nav_menus' => true,
        'publicly_queryable'=> true,
        'query_var'         => true,
        'capability_type'   => 'post',
        'has_archive'       => false,
        'hierarchical'      => false,
        'rewrite'           => array( 'slug' => 'artists', 'with_front' => false ),
        'supports'          => $supports,
        'menu_position'     => 99,
        'menu_icon'         => 'dashicons-groups',
        'taxonomies'        => $taxonomies
    );
    register_post_type('maoriartists',$post_type_args);
}
add_action('init', 'register_maori_artists_posttype');

// Register taxonomy

function maori_artists_taxonomy() {
    register_taxonomy(
        'maoriartistscats',
        'maoriartists',
        array(
            'labels' => array(
                'name' => esc_attr__( 'Artist Categories', 'maori' ),
                'add_new_item' => esc_attr__( 'Add new category', 'maori' ),
                'new_item_name' => esc_attr__( 'New category', 'maori' )
            ),
            'show_ui' => true,
            'show_tagcloud' => false,
            'show_admin_column' => true,
            'show_in_nav_menus' => true,
            'hierarchical' => true,
            'query_var' => true,
            'rewrite' => array( 'slug' => 'artist-category' )
        )
    );
}
add_action( 'init', 'maori_artists_taxonomy', 0 );
?>
Page not found – Hello World !