<?php
function client($atts)
{
    extract(shortcode_atts(array(
        'member'       => '7'
    ), $atts));
    
    $client_return = '';
	
        $args1 = array(
            'post_type'         => array('client'),
            'post_status'       => array('publish'),
            'posts_per_page'    => $member,
            'orderby'           => 'date',
            'order'             => 'DESC'
        );
        
        query_posts($args1);
        if(have_posts())
        {
            
		$client_return .= '<div id="client-carousel">';
            while(have_posts())
            {
                the_post();
				if(has_post_thumbnail( get_the_ID() ))
				{
					$client_thumb = get_the_post_thumbnail(get_the_ID(), 'client_thumb');
				}
				else
				{
					$client_thumb = '<img src="http://placehold.it/190x122/cccccc&amp;text=IMAGE" alt="clients">';
				}
				$client_return .='
				<div class="client">
					'.$client_thumb.'
				</div>';
            }
		$client_return .= '</div>';
        }
        else
        {
            $client_return .= '<div class="col-lg-12 text-center">';
                $client_return .= '<h1 class="common_main_heading">Please Insert Some <span>client</span> First.</h1>';
            $client_return .= '</div>';
        }
        wp_reset_query();
    
    return $client_return;
}
add_shortcode( "rms-client", "client" );