/**
 * Custom Post Festival - festival
 */
 
add_action( 'init', 'register_cpt_festival' );

function register_cpt_festival() {

    $labels = array( 
        'name' => _x( 'Festivals', 'festival' ),
        'singular_name' => _x( 'festival', 'festival' ),
        'add_new' => _x( 'Add New', 'festival' ),
        'add_new_item' => _x( 'Add New festival', 'festival' ),
        'edit_item' => _x( 'Edit festival', 'festival' ),
        'new_item' => _x( 'New festival', 'festival' ),
        'view_item' => _x( 'View festival', 'festival' ),
        'search_items' => _x( 'Search festival', 'festival' ),
        'not_found' => _x( 'No homepage found', 'festival' ),
        'not_found_in_trash' => _x( 'No festival found in Trash', 'festival' ),
        'parent_item_colon' => _x( 'Parent festival:', 'festival' ),
        'menu_name' => _x( 'Festival', 'festival' ),
    );

    $args = array( 
        'labels' => $labels,
        'hierarchical' => false,
        'description' => 'Salsa Festivals',
        'supports' => array( 'title', 'editor', 'thumbnail', 'custom-fields' ),
        'taxonomies' => array( 'festival' ),
        'public' => true,
        'show_ui' => true,
        'show_in_menu' => true,
        
        
        'show_in_nav_menus' => true,
        'publicly_queryable' => true,
        'exclude_from_search' => false,
        'has_archive' => true,
        'query_var' => true,
        'can_export' => true,
        'rewrite' => true,
        'capability_type' => 'post'
    );

    register_post_type( 'festival', $args );
}



/* Inside template */

<?php $args = array( 'post_type' => 'festival', 'posts_per_page' => 10 );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post(); ?>



<?php endwhile; ?>