Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header(); ?>
- <div class="media-wall">
- <?php // set the "paged" parameter (use 'page' if the query is on a static front page)
- $paged = (get_query_var('page')) ? get_query_var('page') : 1;
- // Query Arguments
- $args = array(
- 'post_type' => array('post', 'events', 'galleries', 'videos'),
- 'posts_per_page' => '11',
- 'paged' => $paged
- );
- // The Query
- $the_query = new WP_Query( $args );
- // The Loop
- if ( $the_query->have_posts() ) :
- echo '<ul class="group" id="wall-posts">';
- while ( $the_query->have_posts() ) :
- $the_query->the_post();
- get_template_part( 'content' );
- endwhile;
- get_template_part( 'includes/tweet' );
- echo '</ul>';
- echo '<div class="next-posts">';
- next_posts_link( 'load more', $the_query->max_num_pages );
- echo '</div>';
- else:
- echo '<h2 class="no-posts">There are no news posts</h2>';
- endif;
- wp_reset_postdata();
- ?>
- </div>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement