Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //From multiple post format only standard post format display
- <?php
- $g_post = new WP_Query(array(
- 'post_type' => 'post',
- // 'offset' => 4,
- 'posts_per_page' => 3,
- 'tax_query' => array(
- array(
- 'taxonomy' => 'post_format',
- 'field' => 'slug',
- 'terms' => array( 'post-format-gallery', 'post-format-aside' ),
- 'operator' => 'NOT IN'
- )
- )
- ));
- ?>
- <?php if ($g_post->have_posts()): while ($g_post->have_posts()) : $g_post->the_post(); ?>
- //HTML dynamic code here
- <?php endwhile;
- else :
- echo wpautop('Sorry, no posts were found');
- endif;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement