• I have two different query_posts set up for two different pages both with the global $query_string (due to WP-PageNavi not paginating). Could that be the problem? How could I solve this?

    <?php $i=1; ?>
    <?php global $query_string; ?>
    <?php query_posts($query_string . '&showposts=12&cat=291,292,293,294,295'); ?>
    <?php if (have_posts()) : ?>
    
    <?php while (have_posts()) : the_post(); ?>
    
    <div class="post rndall<?php if($i%3 == 0) { echo ' right'; }; $i++; ?>">
    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><img class="thumbnail" src="<?php echo get_post_meta($post->ID, "Thumbnail", true);?>" width="168" /></a>
    <h2 class="rndall"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php limit_title($post->post_title, 25); ?></a></h2>
    <p>From: <?php the_category(', '); ?></p>
    </div>
    
    <?php endwhile; ?>
    
    <?php wp_pagenavi();?>
Viewing 1 replies (of 1 total)
  • Thread Starter cpkid2

    (@cpkid2)

    Please disregard my previous message. I realize I was a bit vague. To clarify what I mean:

    Here is what I currently have set up in archive.php:
    https://wordpress.pastebin.com/01dEvDCe

    And here is what I currently have set up in a custom template called “Videos” (videos.php):
    https://wordpress.pastebin.com/28LpD68j

    I’m querying posts with “$query_string” because WP-PageNavi doesn’t work without it. However, the strange thing is the posts show up fine on archive.php, however, nothing shows up in videos.php. What could be the reason?

Viewing 1 replies (of 1 total)
  • The topic ‘query_posts not showing the posts…’ is closed to new replies.