[wp-hackers] profiles for authors with no posts
justin at justintadlock.com
Sat Jan 22 19:42:49 UTC 2011
There's no way for WordPress to know how your custom post types are
intended to be used. It's all about the implementation rather than the
registration. They're custom, after all.
Anyway, you shouldn't get a 404 on that page. It should be a 200
status. I assume your theme is incorrectly displaying a 404 message.
Hook into pre_get_posts though to change the posts displayed on the page.
On 1/21/2011 12:35 PM, Steve Taylor wrote:
> Hi folks,
> I'm working on a theme for an online academic journal. Because it's
> structured based on articles grouped by issue, I'm using a custom post
> type for articles, and a custom field to assign them to an issue.
> The problem is that by default the /author/authors-name/ permalink
> returns a 404 if they have no posts - presumably this is purely based
> on posts of the post_type "post"!
> I can think of a few ways round this, but before I dive in, I thought
> I'd ask - what's the most elegant way anyone here's achieved this?
> Furthermore, is this an issue worth raising? I might be missing a Trac
> ticket, but a quick search found nothing. Surely author profiles
> should accommodate custom post types? What about pages even?
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers