Pagination in category
-
I have 50 categories in a WordPress site. I wants to show five categories on every page with pagination with 10 post. I have tried but pagination is not creating.
<?php // get all the categories from the database $cats = get_categories(); // loop through the categries foreach ($cats as $cat) { // setup the cateogory ID $cat_id= $cat->term_id; // Make a header for the cateogry ?> <div class="cats-by-2"> <div class="cat-posts-left"> <h2 class="feat-title"><span><a href=""><?php echo '<h2>'.$cat->name.'</h2>'; ?></a></span></h2> <div class="posts-by-3"> <?php // create a custom wordpress query query_posts("cat=$cat_id"); $count = 1; if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post-wrap<?php if ($count%3 == 0) { ?> right<?php } ?>"> <div <?php post_class(); ?> id="post-main-<?php the_ID(); ?>"> <div class="entry clearfix"> <h2 class="post-title"><a href="<?php the_permalink() ?>" rel="<?php _e("bookmark", "solostream"); ?>" title="<?php _e("Permanent Link to", "solostream"); ?> <?php the_title(); ?>"><?php the_title(); ?></a></h2> </div> <?php include (TEMPLATEPATH . "/postinfo.php"); ?> </div> </div> <?php if ( $count%3 == 0 ) { ?> <div class="post-clear"></div> <?php } ?> <?php $count = $count + 1 ?> <?php endwhile; endif; // done our wordpress loop. Will start again for each category ?> </div></div> </div> <?php } // done the foreach statement ?>The blog I need help with is: (visible only to logged in users)
-
Please read this entry > http://support.wordpress.com/com-vs-org/
Note that we bloggers cannot access the php underlying our themes here on this WordPress.com multiuser blogging platform and edit it on free hosted WordPress.com blogs like http://nareshwebdeveloper.wordpress.com/
Also note that WordPress.com and WordPress.org are completely separate sites with different username accounts and logins. If the blog you refer to is not a free hosted WordPress.com blog then we cannot help you with it. You are posting to the wrong support forum. If you don’t have a username account at WordPress.ORG click http://wordpress.org/support/ and register one on the top right hand corner of the page that opens, so you can post to the support forums there and receive advice from WordPress.ORG bloggers.
- The topic ‘Pagination in category’ is closed to new replies.