Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

SLide GO

// Add Shortcode
function slider( $atts ) {

	// Attributes
	$atts = shortcode_atts(
		array(
			'category_name' => 'news',
			'post_per_page' => '4',
			'offset' => '0',
		),
		$atts
	);

	
		<!-- ### -->
		<div class="row gallery-listing gallery-listing-10 block-listing">
			<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
			<?php 
		// the query
		$arg = array(
		    'post_type' => 'post',
			'category_name' => 'aktualnosci-nowe,news',
			'posts_per_page' => 4
		);
		
		$query = new WP_Query( $arg );
		?><div class="row large slider-style-10">
				<?php while ( $query->have_posts() ) : $query->the_post(); 
					$featured_img_url = get_the_post_thumbnail_url(get_the_ID(), array(263,350) ); 
					$featured_img_url2 = get_the_post_thumbnail_url(get_the_ID(),'main-block'); 
					$category = get_the_category();
					$my_var = get_comments_number( $post_id );
				?>
				
					<div class="col-lg-3 col-md-3 col-sm-4 col-xs-6 slider-part-1">
						<article class="post-69564 type-post format-standard has-post-thumbnail  block-highlight main-term-3" itemscope="itemscope" itemtype="http://schema.org/Article">
							<a class="post-thumbnail image-link" itemprop="thumbnailUrl" href="<?php the_permalink(); ?>">
								<img width="263" height="350" src="<?php echo esc_url($featured_img_url); ?>" class="img-responsive wp-post-image" alt="">
								</a>
								
								<div class="content">
									<h2 class="title">
										<a class="post-url" itemprop="url" rel="bookmark" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
											<span class="post-title" itemprop="headline"><?php the_title(); ?></span>
										</a>
									</h2>
									<div class="post-meta meta ">
										<span class="time">
											<i class="fa fa-clock-o"></i>
											<time class="post-published updated" datetime="<?php the_time('Y-m-d H:i:s'); ?>" title="<?php the_time('Y-m-d H:i:s'); ?>"><?php the_time('Y-m-d'); ?></time>
										</span>
									</div>
								</div>
							</article>
						</div>
						
								<?php endwhile; wp_reset_query(); wp_reset_postdata();  ?>
									
								</div>
								<div class="row">
								
								<?php 
								$arg = array(
								'post_type' => 'post',
			'category_name' => 'aktualnosci-nowe,news',
			'posts_per_page' => 3,
		    'offset' => 4
		);
		
		$query = new WP_Query( $arg );
								while ( $query->have_posts() ) : $query->the_post(); 
					$featured_img_url = get_the_post_thumbnail_url(get_the_ID(), array(360,165) ); 
					$featured_img_url2 = get_the_post_thumbnail_url(get_the_ID(),'main-block'); 
					$category = get_the_category();
					$my_var = get_comments_number( $post_id );
				?>
									<div class="col-lg-4 col-md-4 col-sm-6 col-xs-12 slider-part-5">
										<article class="post-69363 type-post format-standard has-post-thumbnail  block-highlight main-term-3" itemscope="itemscope" itemtype="http://schema.org/Article">
											<a class="post-thumbnail image-link" itemprop="thumbnailUrl" href="<?php the_permalink(); ?>">
												<img width="360" height="165" src="<?php echo esc_url($featured_img_url); ?>" class="img-responsive wp-post-image" alt="">
												</a>
												
												<div class="content">
													<h2 class="title">
														<a class="post-url" itemprop="url" rel="bookmark" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
															<span class="post-title" itemprop="headline"><?php the_title(); ?></span>
														</a>
													</h2>
												</div>
											</article>
										</div>
									
											<?php endwhile; wp_reset_query(); wp_reset_postdata();  ?>
											</div>
										</div>
									</div>

}
add_shortcode( 'slider', 'slider' );