简体   繁体   中英

Wordpress: how to debug a 404?

I've a category with actually 30 articles.

when switching from page 2 to 3 i got a 404 !

It's setyup for 10 articles per page. so at page 3 there are really items to display.

If I remove an article, page 3 goes well If I add an article, tot 31, page 3 works and also new page 4 works well

I cannot undeerstand what's the problem. And of course I need help to understand how to debug, I've no idea of internal routing strategy of wordpress, so I don't know which php file inspect ..

I am not quite sure I understand the details, but in general: the way I would do it is change the URL scheme of WordPress and remove URL rewriting

(Set "ugly" links: http://codex.wordpress.org/Using_Permalinks )

Then go to your database and see if the pages you're trying to access actually exist (the table is called wp-posts , compare the id field to what you get in the GET variable p ).

The code you're looking for is likely in the category.php file. Or at least that's the start of the codepath you should be digging through. If you're getting a 404, my guess is that the paging functions are not setting up the URL correctly. When looking through the links to different pages in this category, is one of them noticeably different (in structure) from the others?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM