Pagination active / focus states not working
-
Hi all hope some one can help i am having issues with getting the pagination to run correctly on index.php the links work correctly to change the pages however the active /focus state does not i have a feeling it is because of the way the page splits half way down any suggestions
home page https://www.thinkluke.com
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $newpaged = $paged-1; $pagedi = strval($newpaged) * 10; settype($pagedi, "integer"); query_posts( $query_string.'showposts=6&offset='.$pagedi ); if (have_posts()) : while (have_posts()) : the_post(); $category = get_the_category(); ?> <div <?php post_class(); ?>> <div class="post-meta clearfix"> <h3 class="post-title left"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> <p class="post-info right"> <?php the_time( 'j F' ) ?> </p> </div><!-- End post-meta --> <div class="post-box"> <div class="post-content"> <?php if( get_post_meta( $post->ID, "image_value", true ) ) : ?> <div class="post-image"> <div class="comment-count"> <?php comments_popup_link(__( '0' ), __( '1' ), __( '%' )); ?> </div> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><img src="<?php bloginfo( 'template_directory' ); ?>/timthumb.php?src=<?php echo get_post_meta( $post->ID, "image_value", true ); ?>&w=600&h=250&zc=1" alt="<?php the_title(); ?>" /></a> <div class="continue-reading"> <a href="<?php the_permalink() ?>#more-<?php the_ID(); ?>" rel="bookmark" title="Continue Reading <?php the_title_attribute(); ?>">Continue Reading</a> </div> </div> <?php endif; ?> <div class="post-intro"> <?php the_excerpt( '' ); ?> <span>By <?php the_author_posts_link(); ?></span> </div><!-- End post-intro --> </div><!-- End post-content --> <div class="post-footer clearfix"> <!--<div class="continue-reading"> <a href="<?php the_permalink() ?>#more-<?php the_ID(); ?>" rel="bookmark" title="Continue Reading <?php the_title_attribute(); ?>">Continue Reading</a> </div>--> <div class="category-menu"> <ul> <li class="tag"> TAGS </li> <li><a href="<?php echo get_category_link( $category[0]->cat_ID ); ?>"> <?php echo $category[0]->cat_name; ?></a></li> <li><a href="<?php echo get_category_link( $category[1]->cat_ID ); ?>"> <?php echo $category[1]->cat_name; ?></a></li> <li><a href="<?php echo get_category_link( $category[2]->cat_ID ); ?>"> <?php echo $category[2]->cat_name; ?></a></li> <li><a href="<?php echo get_category_link( $category[3]->cat_ID ); ?>"> <?php echo $category[3]->cat_name; ?></a></li> </ul> <div class="category clearfix"> </div> <div class="dropdown"> <ul class="cat-posts"> <?php $posted = get_posts( "category=" . $category[0]->cat_ID ); if( $posted ) : foreach( $posted as $post ) : setup_postdata( $posted ); ?> <li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a><span><?php the_time( ' F j, Y' ) ?></span></li> <?php endforeach; endif; ?> <li class="view-more"><a href="<?php echo get_category_link( $category[0]->cat_ID ); ?>" class="view-more">View More »</a></li> </ul> </div><!-- End dropdown --> </div><!-- End category --> </div><!-- End post-footer --> </div><!-- End post-box --> </div><!-- End post --> <?php endwhile; endif; ?> <?php $pagedj = $pagedi +6; query_posts( 'showposts=4&offset='.$pagedj ); if (have_posts()) : $counter = 0; while (have_posts()) : the_post(); $category = get_the_category(); if( $counter % 2 == 0 ) $end = ""; else $end = "last"; ?> <div <?php post_class( 'single ' . $end ); ?>> <div class="post-meta clearfix"> <h3 class="post-title left"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> </div><!-- End post-meta --> <div class="post-box"> <div class="post-content"> <div class="comment-count"> <?php comments_popup_link(__( '0 ' ), __( '1' ), __( '%' )); ?> </div> <?php if( get_post_meta( $post->ID, "image_value", true ) ) : ?> <div class="post-image"> <img src="<?php bloginfo( 'template_directory' ); ?>/timthumb.php?src=<?php echo get_post_meta( $post->ID, "image_value", true ); ?>&w=265&h=120&zc=1" alt="<?php the_title(); ?>" /> </div> <?php endif; ?> <div class="post-intro"> <?php the_excerpt( '' ); ?> </div><!-- End post-intro --> </div><!-- End post-content --> <div class="post-footer clearfix"> <div class="continue-reading"> <a href="<?php the_permalink() ?>#more-<?php the_ID(); ?>" rel="bookmark" title="Continue Reading <?php the_title_attribute(); ?>">Continue Reading</a> </div> </div><!-- End post-footer --> </div><!-- End post-box --> </div><!-- End post --> <?php // Clear the left float to allow for different heights if( $counter % 2 != 0 ) echo'<div style="clear:left;"> </div>'; ?> <?php $counter++; endwhile; endif; ?> <br /> <?php query_posts( 'showposts=&offset=' ); if (have_posts()) : while (have_posts()) : the_post(); $category = get_the_category(); ?> <div <?php post_class( ); ?>> </div><!-- End archive --> <?php endwhile; endif; ?> <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?> </div><!-- End col-580 (Left Column) --> <div class="col-340 right"> <ul id="sidebar"> <?php get_sidebar(); ?> </ul><!-- End sidebar --> </div><!-- End col-340 (Right Column) --> </div><!-- End container --> </div><!-- End main-content --> <?php get_footer(); ?>
any help would be terrific
thanks again
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Pagination active / focus states not working’ is closed to new replies.