create new post type and get posts

Create a new post type and get the posts from that type. For more information on post information: http:codex.wordpress.orgFunction_Referenceregister_post_type & http:codex.wordpress.orgTemplate_Tagsget_posts

 array(
				'name' => __( 'Hero Slides' ),
				'singular_name' => __( 'Hero Slide' ),
				'add_new' => __( 'Add New Hero Slide' ),
				'add_new_item' => __( 'Add New Hero Slide' ),
               	'edit_item' => __( 'Edit Hero Slide' ),
               	'new_item' => __( 'Add New Hero Slide' ),
               	'view_item' => __( 'View Hero Slide' ),
               	'search_items' => __( 'Search Hero Slide' ),
               	'not_found' => __( 'No hero slides found' ),
               	'not_found_in_trash' => __( 'No hero slides found in trash')
			),
		'public' => true,
		'publicly_queryable' => true,
		'exclude_from_search' => true,
		'supports' => array('title', 'thumbnail')
		)
	);
}

function get_slider_images($num = 3) {
    $args = array(
        'numberposts'     => $num,
        'offset'          => 0,
        'orderby'         => 'menu_order, post_title',  post_date, rand
        'order'           => 'ASC',
        'post_type'       => 'slider',
        'post_status'     => 'publish',
        'suppress_filters' => true
    );
    $posts = get_posts($args);
    foreach ($posts as $post) {
        $img = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full', false);
	    $html .= '
	        
  • Shop Now
  • '; } return $html; } ?>