Advertisement
rakeshr

category pagination not working

Mar 18th, 2013
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.44 KB | None | 0 0
  1. <?php get_header(); ?>
  2. <div id="pagecontent">
  3. <div id="crenav">
  4.  
  5. <?php $wpgleftposts = new WP_Query('category_name=credits&orderby=id&order=asc&posts_per_page=1'); ?>
  6.                <?php while ($wpgleftposts->have_posts()) : $wpgleftposts->the_post(); ?>
  7.  
  8. <?php $curpid = $post->ID; ?>
  9.  
  10.                <?php endwhile; ?>
  11.  
  12.  
  13. <?php
  14. $parentCatName = single_cat_title('',false);
  15. $parentCatID = get_cat_ID($parentCatName);
  16. $childCats = get_categories( 'child_of='.$parentCatID );
  17. if(is_array($childCats)):
  18. foreach($childCats as $child){ ?>
  19. <h1><a href="<?php the_permalink() ?>" rel="bookmark"  <?php if ($curpid == $post->ID){echo 'class = "current"';} ?>  title="Permanent Link to <?php the_title_attribute(); ?>"><?php echo $child->name; ?></a></h1>
  20. <?php }
  21. endif;
  22. ?>
  23.  
  24.  
  25. </div>
  26. <div id="crepost">
  27.  <?php if (have_posts()) : ?>
  28.  
  29.  <?php query_posts( array(
  30.      'cat' => '9',
  31.      'orderby' => 'id',
  32.      'order' => 'asc',
  33.      'paged' => ( get_query_var('page') ? get_query_var('page') : 1 ),
  34. ));
  35. ?>
  36.  
  37.   <?php //$creloop = new WP_Query('category_name=credits&orderby=id&order=asc&paged=$paged'); ?>
  38.                <?php while (have_posts()) : the_post(); ?>
  39. <div class="crepostbox">
  40. <div class="crebcon"><h1><?php the_title(); ?></h1></div>
  41. <?php  the_post_thumbnail('full'); ?>
  42. </div>
  43.                <?php endwhile; ?>
  44.  
  45. <?php kriesi_pagination();
  46.  
  47.  ?>
  48.  
  49.                
  50.      <?php endif; ?>
  51. </div>
  52. </div>
  53.  
  54.  
  55. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement