Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

ded_news_archive_shortcode

// Add Shortcode
function ded_news_shortcode() {

	// WP_Query arguments
	$args = array(
	    'post_type'              => array( 'ded_news' ),
	    'nopaging'               => false,
	    'posts_per_page'         => '12',
	    'posts_per_archive_page' => '12',
	    'order'                  => 'DESC',
	    'orderby'                => 'date',
	);
	
	// The Query
	$news = new WP_Query( $args );
	
	//Aufbau der Seite
	echo '<section id="primary" class="content-area col-sm-12 col-lg-8">';
			echo '<main id="main" class="site-main" role="main">';
	// The Loop
	if ( $news->have_posts() ) {
	    while ( $news->have_posts() ) {
	        $news->the_post();
	        echo the_ID();
	    }
	} else {
	    // no posts found
	}
	
	// Restore original Post Data
	wp_reset_postdata();

}
add_shortcode( 'ded_news', 'ded_news_shortcode' );