WordPress.org

Forums

Tag Pages Not Paginating (1 post)

  1. caricky
    Member
    Posted 2 years ago #

    Hi,

    On my site I use tags, however for some tags there are hundreds of results and with my tag pages not paginating it can lead to site stopping sever loads.

    I was hoping someone may be able to take a look at the code below and tell me if it's missing something to make that pagination happen.

    Thanks

    <?php get_header(); ?>
    
    <div class="page">
    
    <?php get_sidebar(); ?>
    	<!-- start content -->
    	<div id="content">
    
    <div align="right">
    <?php include (TEMPLATEPATH . '/searchform2.php'); ?>
    
    </div>
    
    <?php is_tag(); ?>
    
    		<?php if (have_posts()) : ?>
    
     	  <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
    
    	<?php if (is_category('Blog')) { ?>
    <? } else {?>
    
    		<div class="items">
    
    <? $insertat= "3"; //rand(1, 3); $shown=0;$i=0; ?>
    
    		<?php while (have_posts()) : the_post(); ?>
    <? $i++;
     if ($i=="5"){ ?>
    
    <? }
    if (!$shown){
    if ($i==$insertat) { $shown=1; ?>
    
    <? } } ?>
    
    			<div class="item">
    <A href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><div class="item-title"><?php the_title(); ?> Logo Gallery</div>
    <img height="158px" width="198px" src="<?php $values = get_post_custom_values("thumbs"); echo $values[0]; ?>" title="<?php the_title(); ?>" /></a>
    
    <div class="ratings">
    <?php if(function_exists('the_ratings')) { the_ratings(); } ?>
    </div>
    </div><!-- Item Div -->
    			<?php endwhile; ?> <? }?>
    </div>
    <div class="clear"></div>
    
    		<div class="Nav"><?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?></div>
    
    	<?php endif; ?>
    
    <?php if ( function_exists('wp_tag_cloud') ) : ?>
    <div class="tabbertab">
    <h3><img src="<?=bloginfo('stylesheet_directory')?>/images/tag-icon.png" class="tabicon">Popular Tags</h3>
    <div class="alt grad">
    <?php wp_tag_cloud('smallest=8&largest=10&number=100'); ?>
    </div>
    <?php endif; ?>
    </div>
    <br><br>
    	</div><!-- End CONTENT Div -->
    
    	<div class="clear"><!-- --></div>
    	</div><!-- End PAGE Div -->
    <?php get_footer(); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic