Support » Fixing WordPress » page navigation within category leaves current category

Viewing 9 replies - 1 through 9 (of 9 total)
  • anyone? I’m completely stumped on this one.

    bump… please anyone?

    Alright, I’ve found the culprit. CForms.

    After submitting a trac and help from a developer it was determined to be CForms.

    I am resolving this and opening a new post under CForms.

    What do you mean the problem was CForms? I’m having the same issue and curious what kind of solutions there are.

    I had no specifics other than when I disabled the plugin, the inter-category page navigation worked properly. I notified the developer of cforms and he quickly gave me a beta which worked. The beta is now part of the stable release from a number of releases ago so if you have the latest cforms it shouldn’t be a problem.

    If you don’t have cforms it might be another plugin stepping on the code. Disable all your plugins and check it. If it works enable one at a time (or small group) and test till it breaks. You’ll find which one is breaking it.

    I’m having the exact same problem and I don’t have any plugins installed

    I have the posts displayed on a “news” page which is actually the category.php page but when I click to see older posts it takes me back to the index.php page.

    I’m using this for my navigation:

    <div class="alignleft">
        <?php posts_nav_link('','','&laquo; Previous Entries') ?>
       <div class="alignright">
        <?php posts_nav_link('','Next Entries &raquo;','') ?>

    Are you using something different?

    Many thanks,

    Read Template_Tags/next_post_link

    If I understand you correctly, your code should read

    <div class="alignleft">
    <?php prev_post_link('%link', '&laquo; Previous Entries', TRUE); ?>
    <div class="alignright">
    <?php next_post_link('%link', 'Next Entries &raquo;', TRUE); ?>

    Thanks for the reply Heriz – I’m quite new to wordpress but isn’t that to display the next single post rather than the next “page” of posts? – I’m probably wrong on this though.

    I tried adding the code to the page both inside and outside the loop but this broke the page.

    Just to be clear – I have a category page, that’s displaying all the posts in the news category. The posts are limited to 3 so they should be paged. When I click “previous” it seems to go to the index page rather than staying on the category page. Also it says “Sorry, no posts matched your criteria”

    I did see something that sounded similar at the bottom of here: (Paged Navigation Doesn’t Work ) but I went though the fix with no joy.

    Maybe I’ve set my whole loop up wrong. I have:

    <?php if (have_posts()) : ?>
     <ul id="news_list">
       <?php while (have_posts()) : the_post(); ?>
         <li><h2 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
    <?php the_title(); ?></a> <span class="date"><?php the_time('F jS, Y') ?></span> </h2>
    	<p><?php $excerpt = strip_tags(get_the_excerpt());
            echo $excerpt; ?></p> </li>
    <?php endwhile; ?>
     <div class="navigation">
       <div class="alignleft">
        <?php posts_nav_link('','','&laquo; Previous Entries') ?>
       <div class="alignright">
        <?php posts_nav_link('','Next Entries &raquo;','') ?>
    <?php else : ?>
      <h2 class="center">Not Found</h2>
    <p class="center"><?php _e("Sorry, but you are looking for something that isn't here."); ?></p>
     <?php endif; ?>

    Maybe if someone would be kind enough to post their code I might be able to see where I am going wrong or if this is a HTACCESS problem.

    Many thanks

    Got it! I was linking to my category.php page using this actual URL in my navigation:


    Really though I needed to go:



Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘page navigation within category leaves current category’ is closed to new replies.