Tutorials (show)
// WP_Query arguments
$args = array (
'post_type' => 'tutorials',
'post_status' => 'publish',
'pagination' => true,
'posts_per_page' => '4',
'ignore_sticky_posts' => false,
'meta_query' => array(
array(
'key' => 'video_link',
),
),
'cache_results' => false,
'update_post_meta_cache' => false,
'update_post_term_cache' => false,
);
// The Query
$tutorials = new WP_Query( $args );
// The Loop
if ( $tutorials->have_posts() ) {
while ( $tutorials->have_posts() ) {
$tutorials->the_post();
// do something
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();