WordPress Paged


/ Published in: PHP
Save to your folder(s)

I can't access the global $paged variable.


Copy this code and paste it in your HTML
  1. <?php
  2. /* Template Name: Portfolio Layout */
  3. /* Description */
  4.  
  5. global $paged;
  6.  
  7. get_header();
  8. query_posts("posts_per_page=1&paged=$paged");
  9. if(have_posts()){
  10. while(have_posts()){
  11. the_post();
  12. the_title();
  13. the_content();
  14. }
  15. }
  16.  
  17. get_footer();
  18. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.