Mydocs query
// WP_Query arguments
$args = array(
'post_type' => array( 'dokument' ),
'post_status' => array( 'publish' ),
'nopaging' => false,
'paged' => '1',
'posts_per_page' => '4',
'posts_per_archive_page' => '4',
'ignore_sticky_posts' => false,
'order' => 'DESC',
'orderby' => 'date',
'cache_results' => true,
);
// The Query
$query-mydocs = new WP_Query( $args );
// The Loop
if ( $query-mydocs->have_posts() ) {
while ( $query-mydocs->have_posts() ) {
$query-mydocs->the_post();
// do something
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();