Last active
November 16, 2017 19:35
-
-
Save obiPlabon/05da75cc34c09ec606bbea1383355f65 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $paged = get_query_var('paged') ? get_query_var('paged') : 1; | |
| $args = array( | |
| 'post_type' => 'post', | |
| 'paged' => $paged, | |
| 'post__not_in' => get_option( 'sticky_posts' ), | |
| 'ignore_sticky_posts' => true, | |
| 'tax_query' => array( | |
| array( | |
| 'taxonomy' => 'post_format', | |
| 'field' => 'slug', | |
| 'terms' => 'post-format-video', | |
| 'operator' => 'NOT IN', | |
| ) ) | |
| ); | |
| if ( 1 == $paged ) { | |
| $args['offset'] = 3; | |
| } | |
| $my_query = new WP_Query( $args ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $paged = get_query_var('paged') ? get_query_var('paged') : 1; | |
| $args = array( | |
| 'post_type' => 'post', | |
| 'paged' => $paged, | |
| 'post__not_in' => get_option( 'sticky_posts' ), | |
| 'ignore_sticky_posts' => true, | |
| 'offset' => 3 + ( $paged - 1 ) * get_option( 'posts_per_page' ) | |
| 'tax_query' => array( | |
| array( | |
| 'taxonomy' => 'post_format', | |
| 'field' => 'slug', | |
| 'terms' => 'post-format-video', | |
| 'operator' => 'NOT IN', | |
| ) ) | |
| ); | |
| $my_query = new WP_Query( $args ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment