Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: WP_Query Template
- */
- get_header(); ?>
- <div id="primary" class="content-area">
- <main id="main" class="site-main" role="main">
- <?php
- // Start the loop.
- while ( have_posts() ) : the_post();
- // Include the page content template.
- get_template_part( 'content', 'page' );
- // End the loop.
- endwhile;
- ?>
- <?php
- wp_reset_postdata();
- $args = array(
- 'category_name' => 'music'
- );
- $the_query = new WP_Query( $args);
- ?>
- <?php
- // Start the loop.
- while ( have_posts() ) : the_post();
- // Include the page content template.
- get_template_part( 'content', 'page' );
- // End the loop.
- endwhile;
- ?>
- </main><!-- .site-main -->
- </div><!-- .content-area -->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment