[wp-trac] [WordPress Trac] #14324: 404 when querying custom post types on author.php
WordPress Trac
wp-trac at lists.automattic.com
Thu Jul 15 21:49:47 UTC 2010
#14324: 404 when querying custom post types on author.php
--------------------------+-------------------------------------------------
Reporter: truthmedia | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Post Types | Version: 3.0
Severity: major | Keywords: post_type, author.php, 404, custom post types
--------------------------+-------------------------------------------------
Not sure if it's the only place, but on the author.php template, when you
change the post_type of the loop, WordPress seems to only want to return
the number of pages it WOULD have had if post_type=post was used.
Example: On our author.php template, we've changed the loop to use the
following custom query:
author=123&post_type=any&post_status=publish&orderby=title&order=ASC&paged=6
In this case, it's looking for all published pages and posts (any) by the
author with the ID of 123, and we're looking at page six of the results.
On our site, this page shows up fine, but when we go to page 7 using the
standard wordpress next/prev links we get a 404 error, in spite of the
fact that there are MANY more pages and posts to be displayed.
If I configure the code to only show posts, it shows 6 pages of results
which is exactly how many it SHOULD show.
Therefore, it seems that there is something in the code that detects
whether or not the page is a 404, which is predisposed to only showing
posts as opposed to "any".
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14324>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list