Support » Plugins and Hacks » Hacks » Navigation panel with new WP QUERY does not work! :-(

  • Guys I am trying to make a custom ARCHIVE.php, you can check it out below. The problem is, I can see all the posts, but the navigation pages just don’t work, if I press the Next Page, the posts just stay the same and don’t change to the following posts…

    <?php
    
    foreach((get_the_category()) as $category) {
    $categegoryname = $category->cat_name;
    }
    
    $my_query = new WP_Query('cat='.$categoryname.'&posts_per_page=1');
    while ($my_query->have_posts()) : $my_query->the_post();
    //the first post with big thumbnail in column 1
    endwhile; 
    
    $my_query = new WP_Query('cat='.$categoryname.'&posts_per_page=4&offset=1');
    while ($my_query->have_posts()) : $my_query->the_post();
    //the following 4 posts with small thumbnails in column 1
    endwhile; 
    
    $my_query = new WP_Query('cat='.$categoryname.'&posts_per_page=7&offset=5');
    while ($my_query->have_posts()) : $my_query->the_post();
    //the 5 posts with small thumbnails in column 2
    endwhile; 
    
    ?>
    
    <?php 
    
    posts_nav_link(' • '); 
    
    ?>
  • The topic ‘Navigation panel with new WP QUERY does not work! :-(’ is closed to new replies.