Advertisement
Guest User

pagination page template correct!

a guest
Mar 12th, 2012
555
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: agenda
  4. */
  5. ?>
  6.  
  7. <?php get_header(); ?>
  8.  
  9.  
  10. <div id="main-content">
  11.  
  12. <h2><?php the_title(); ?></h2>
  13. <br/>
  14.  
  15. <?php global $wp_query, $meta ,$paged;
  16. $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
  17. $temp = $wp_query;
  18. $wp_query= null;
  19. $wp_query = new WP_Query('cat=3&order=ASC');
  20. $wp_query->query("paged=$page&cat=3");?>
  21. <?php
  22.  
  23.  
  24.  
  25.  
  26. while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
  27.  
  28. <div>
  29.  
  30. <h3><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s'), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h3>
  31.  
  32. <small><?php the_time('d/m/Y') ?></small>
  33.  
  34. <br/>
  35. <br/>
  36. <?php the_content('<br />Read more &raquo;'); ?>
  37. <br/>
  38. <?php edit_post_link('Artikel bewerken', '', ''); ?>
  39. <br/>
  40. </div>
  41.  
  42. <?php endwhile; ?>
  43. <?php wp_reset_query(); ?>
  44.  
  45. <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
  46.  
  47. </div>
  48.  
  49.  
  50.  
  51. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement