query
// WP_Query arguments
$args = array (
'post_type' => array( 'page' ),
'post_status' => array( 'publish' ),
'cat' => '10',
'category_name' => 'Seite, Neu, Query',
'tag_id' => '10',
'tag' => 'Post, Page, Admin',
'author' => '11',
'author_name' => 'Julian Dröge',
's' => 'Query, DB, Admin',
'pagination' => true,
'paged' => '1',
'posts_per_page' => '2',
'posts_per_archive_page' => '4',
'ignore_sticky_posts' => true,
'offset' => '1',
'order' => 'DESC',
'orderby' => 'id',
'year' => '2015',
'monthnum' => '9',
'day' => '16',
'hour' => '9',
'meta_query' => array(
array(
'key' => 'isi-treff-show-name',
'value' => 'ISI-Treff ',
'compare' => '=',
'type' => 'CHAR',
),
),
'perm' => 'subscriber',
'cache_results' => true,
'update_post_meta_cache' => true,
'update_post_term_cache' => true,
);
// The Query
$query = new WP_Query( $args );
// The Loop
if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
$query->the_post();
// do something
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();