Jump to content

Archived

This topic is now archived and is closed to further replies.

ketri

Category archives give 404 when I use pagination to go to categoryname/page/2/

Recommended Posts

ketri    7
ketri

Hi

When I customize the category archive template to have pagination, and go to previous pages (categoryname/page/2/ etc.) I get an 404 error. 
Where should I begin debugging?

I tried to set the number of posts very low like 1-2 so I could test the pagination which of course needs to work later on when there are more posts.

Thank you.

 

 

EDIT: some googling provided this link which is likely to be related: http://wordpress.org/support/topic/explanation-and-workaround-for-error-404-on-category-pagination

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Hi,

 

I have just this moment set the reading option to display 2 posts and when I view my category page, the pagination works as intended. I can navigate to page2, page3 etc... without any issue.

 

Therefore, you either have an issue with a plugin, custom code or could well be your server. I recommend disabling all active plugins and see if this resolves the issue. If it doesn't remove any custom code such as custom sections you may be using and use the DMS core sections, then see if this resolves your issue.

  • Like 1

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
ketri    7
ketri

Hi,

 

I have just this moment set the reading option to display 2 posts and when I view my category page, the pagination works as intended. I can navigate to page2, page3 etc... without any issue.

 

Therefore, you either have an issue with a plugin, custom code or could well be your server. I recommend disabling all active plugins and see if this resolves the issue. If it doesn't remove any custom code such as custom sections you may be using and use the DMS core sections, then see if this resolves your issue.

Thanks Danny! I'll see if a vanilla installation also works for me, and go debugging from there in my other project.

Share this post


Link to post
Share on other sites
ketri    7
ketri

Indeed this problem was with permalink structure, not DMS. Thank you anyway!

This thread helped me solve the problem:  http://wordpress.org/support/topic/error-404-on-pagination-when-changing-posts_per_page-on-query_posts
Apparently the problem was that with permalink structure like /%category%/%postname%/  on the url /categoryname/page/2 the page looks like a post/page, not the keyword "page".

This post was the solution: http://wordpress.org/support/topic/error-404-on-pagination-when-changing-posts_per_page-on-query_posts#post-1553417 

 

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Awesome and thanks for informing us the issue has been resolved, we appreciate it.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • JP
      By JP+
      Hello,
      We are working on a 2 languages site (https://liguecardioliga.be) with wpml, and lately the call of a category in the loops section (and all the sections requiring a category to select posts) doesn't work in the translated language. It worked well until recently so I wonder if it's because of a recent update (wordpress, wpml, pagelines, a plugin?). Anyone has the same problem? a solution?
      TIA
    • jagipson
      By jagipson+
      404 When trying to connect site to PL

    • Michael Kummer
      By Michael Kummer+
      Hi guys,
      Is it possible, and if so, how, to change the layout of the archive pages? For example, I would like to use a smaller and more compact image size for featured images and shorten the amount of text that's displayed for each post without also changing how featured images are displayed on single post pages.
      I am talking about https://michaelkummer.com/apple/ vs How to extend the storage of your iPhone or iPad.
      Thanks
      Michael
       
    • webbdo
      By webbdo+
      Hi,
      In the social links Twitter shows 404 error in the API. Example:
      "GET http://urls.api.twitter.com/1/urls/count.json?url=http://www.webbdo.se/cybe…onday/&callback=jQuery1113017799108568578959_1449307004771&_=1449307004772 "
      This on all posts that have the "social links" and Twitter included.
      See example: http://www.webbdo.se/cyber-monday/
      How can it be fixed?
       
    • mzhafzah
      By mzhafzah
      Hello
      I am using DMS 2 theme and I want to create a 2 different links on my website; each link should take you to a different blog post category. Although the process is easy, yet I can not figure out how to give each category page a unique design of its own; Any change I make on any page is applied to the other (I'm aware of the universal elements like the header and footer and I a am not talking about these.)
      Since I am new to wordpress in general, I am not sure if my description is sufficient; apologies if it is not.
      TycoonJé
×