Forums

'Paged' causes 404 error. (10 posts)

  1. nipponese
    Member
    Posted 3 years ago #

    I am trying to use

    <span style="float: left"><?php next_posts_link('&larr; Next') ?></span>
    <span style="float: right"><?php previous_posts_link('Older &rarr;') ?></span>

    in my index.php. Paging works great unless the user has drilled down into a specific category, then paging always returns a 404.

  2. nipponese
    Member
    Posted 3 years ago #

    Ok, I've deduced that this only happens when permalinks are set to something other than Default.

  3. nipponese
    Member
    Posted 3 years ago #

    Anyone?

  4. ClaytonJames
    Member
    Posted 3 years ago #

    Ok, I've deduced that this only happens when permalinks are set to something other than Default.

    Did your .htaccess file update without any error after changing from the default permalinks?

  5. nipponese
    Member
    Posted 3 years ago #

    Yes. I have the permission on the file set to 777.

  6. nipponese
    Member
    Posted 3 years ago #

    yes

  7. ClaytonJames
    Member
    Posted 3 years ago #

    Ahhh... if that is your exact code,

    <span style="float: left"><?php next_posts_link('&larr; Next') ?></span>
    <span style="float: right"><?php previous_posts_link('Older &rarr;') ?></span>

    Possible missing semicolons issue?

    <?php next_posts_link('&larr; Next'); ?>
    <?php previous_posts_link('Older &rarr;'); ?>

    Are they necessary in this case?

  8. ClaytonJames
    Member
    Posted 3 years ago #

  9. thinkadrian
    Member
    Posted 3 years ago #

    I read somewhere that you should "set up a page which uses the category as template". Doesn't make sense at all, though... but if it's true, what name shouls the page have, and what more do I need to know to make it work?

  10. thinkadrian
    Member
    Posted 3 years ago #

    Ignore my last comment.

    Apparently, until now, I had this URL format (example):

    http://trendgiveafck.com/street-walk/

    when paging turneed on the site wanted to go to

    http://trendgiveafck.com/street-walk/page/2

    which led to a 404. But if I added "category":

    http://trendgiveafck.com/category/street-walk/page/2

    I came to the correct page. So, I in the admin panel I went to

    Settings->Permalinks and set the field "Category-base" to "category"

    also checked my hard links in my meny to go to "category/street-walk/" instead of just "street-walk"

    Problem resolved!

Topic Closed

This topic has been closed to new replies.

About this Topic