Multiple loops and problem with pagination
-
Hey ! I have basiclly 3 columns where I want post to end up, and I got the first page to render as I want it. with the 2 categories excluded from the first column, only stu from category 12 showing in the 2nd and only stuf from cat-17 in the 3rd column.
Anyway the problem is when I click on prev / next. It doesn’t fetch the rights posts. or they’re not update.
try at
https://www.martinlindelof.com
Im really new at PHP and wordpress but I did it this way.
<!– dont show posts from quickies and peeps –>
<?php
if (is_home()) {
query_posts(“cat=-12,-17”);
}
?><!– do the 1st Loop –>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>and the 2nd loop in index.php
<div id=”quickie”>
<?php
$quickies = new WP_QUERY();
$quickies->query(‘cat=12&showposts=20’);
?><!– do the 2nd Loop for quickie posts –>
<?php while ($quickies->have_posts()) : $quickies->the_post(); ?><div class=”post”>
<div class=”postop”><div class=”pheadfill”> </div></div><div class=”storycontent”>
<div class=”thecontent”><?php the_content(); ?></div>
<div class=”reset”> </div>
</div><!– end STORYCONTENT –>
</div><!– end POST –><?php endwhile; ?>
</div><!– end QUICKIE LIST .. –>
and the 3rd colu,mn is in the sidebar
<!– PEEEEEEPS –>
<div id=”nav”>
<div class=”p-sideitem”>
<div class=”p-boxhead”><div class=”p-headfill”> </div></div><div class=”p-boxbody”>
<h2>People</h2>
</div></div>
<?php
$peeps = new WP_QUERY();
$peeps->query(‘cat=17&showposts=20’);
?><?php if ( $peeps->have_posts() ) : while ( $peeps->have_posts() ) : $peeps->the_post(); ?>
<div class=”p-sideitem”>
<div class=”p-boxhead”><div class=”p-headfill”> </div></div><div class=”p-boxbody”>
<?php the_content(); ?>
</div></div>
<?php endwhile; endif; ?>
</div> <!– end PEEPS –>
- The topic ‘Multiple loops and problem with pagination’ is closed to new replies.