TEXT 12
News By Guest on 28th September 2017 09:58:33 AM
  1. <?php
  2. /*
  3. Template Name: news
  4. */
  5. ?>
  6.  
  7. <?php get_header(); ?>
  8.  
  9. <?php
  10.  
  11.         $temp = $wp_query;
  12.         $wp_query= null;
  13.         $wp_query = new WP_Query();
  14.         $wp_query->query('posts_per_page=5'.'&paged='.$paged);
  15.        
  16.         while ($wp_query->have_posts()) : $wp_query->the_post();
  17.         endwhile;
  18. ?>
  19.  
  20. <?php $wp_query = null; $wp_query = $temp;?>
  21.  
  22. <?php  wp_reset_query(); ?>
  23.  
  24. <?php get_footer(); ?>

Paste is for source code and general debugging text.

Login or Register to delete or keep track of your pastes.