‘paged=’ parameter not working
-
The ‘paged=’ parameter does not work, neither in the previous/nex links, nor whe directly typed in the url field of the browser.
This is my code; this snippet is embedded into a ‘version’ of home.php that displays only if (empty($_REQUEST[‘isarticles’])). In other words, I load this home to exclude posts from category 6.
query_posts("cat=-6");
if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" class="post">
<h2 class="post-title"><a>" title="Permalink to <?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<div class="post-entry">
<?php the_excerpt('<span class="more-link">Continue Reading ?</span>'); ?>
<?php //link_pages('<p class="paged-link">Pages: ', '', 'number'); ?>
</div><!-- END POST-ENTRY -->
<!-- <?php trackback_rdf(); ?> -->
</div><!-- END POST -->
<?php endwhile; ?>
prenav
<div class="navigation">
<div class="alignleft"><?php next_posts_link('? Earlier Posts') ?></div>
<div class="alignright"><?php previous_posts_link('Later Posts ?') ?></div>
</div>
postnav
<?php else : ?>
<div id="post-error" class="post">
<h2 class="post-title"><span class="pre-title">404</span> Page Not Found</h2>
<div class="post-entry">
There's been a problem finding the page you're looking for. Apologies. Perhaps . . .
<ul>
<li>the page your looking for was moved;</li>
<li>your referring site gave you an incorrect address; or</li>
<li>something went terribly wrong.</li>
</ul>
Use the search box and see if you can't find what you're looking for.
</div><!-- END POST-ENTRY -->
</div><!-- END POST -->
<?php endif; ?>
Is there anything in my code that prevents the ‘paged’ parameters from working? Or is it a wp bug?
Thanks in advance,
Davide
- The topic ‘‘paged=’ parameter not working’ is closed to new replies.