Advertisement
Guest User

index.php

a guest
Aug 25th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. <?php
  2. $type = 'anime';
  3. $args=array(
  4. 'post_type' => $type,
  5. 'post_status' => 'publish',
  6. 'paged' => $paged,
  7. );
  8. $temp = $wp_query; // assign original query to temp variable for later use
  9. $wp_query = null;
  10. $wp_query = new WP_Query($args);
  11. ?>
  12.  
  13. <?php if($wp_query->have_posts()) : while($wp_query->have_posts()) : $wp_query->the_post(); ?>
  14. <?php get_template_part('content'); ?>
  15. <?php endwhile; ?>
  16. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement