Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New Coder
    Join Date
    Aug 2011
    Posts
    61
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Wordpress pagenavi stops working with custom query

    I'm trying to get a custom page template to show only post from today. I Think it works because it shows Page 1 of 3 in the Pagenavi instead of Page 1 of 2,137. But, the problem is that when i click page two in wp pagenav, it does nothing but shows page one while showing http://url/page/2/ in the address bar, when in fact it's still on page one!


    My code:

    PHP Code:
    <?php get_header(); ?>

    <div id="blog-container">

    <?php $current_day date('j'); query_posts('day='.$current_day); 
    if (
    have_posts()): while (have_posts()) : the_post(); ?>


    <div id='blog' id='blog-<?php the_ID(); ?><?php post_class(); ?>>
               
               <?php the_author_image(); ?>

               <p id='tji-author'>This Just In from <?php the_author(); ?></p>
               
               <p id='page-title'><a href="<?php the_permalink() ?>"><?php limit_title($post->post_title72); ?></a></p>
                          
               <p id='date'>Freshness:&nbsp;<span id='textspan'><?php wp_days_ago_ajax(); ?></span></p>
               
               <div id='cond' class='clearfix'>
                   <p id='text4'><a href="<?php the_permalink() ?>">Continue Reading on <?php the_author(); ?></a></p>
               </div>

    </div> <!-- blog -->

    <?php endwhile; endif; ?>

    <div class="navigation">
    <?php wp_pagenavi(); ?>
    </div>

     </div>     

    <?php get_footer(); ?>
    Any help is appreciated!
    Last edited by kor81; 08-31-2013 at 08:05 PM.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •