[wp-hackers] Need Custom Post Type Rewrite Help, Please
mikeschinkel at newclarity.net
Sun Apr 18 22:36:02 UTC 2010
On Apr 18, 2010, at 6:00 PM, Andrew Nacin wrote:
> On Sun, Apr 18, 2010 at 5:47 PM, Mike Schinkel <mikeschinkel at newclarity.net>
>>> if ( is_post_type( 'financial-term', $id ) )
>> I assume this is sarcastic? If so, was there something I did wrong?
> On Sun, Apr 18, 2010 at 5:52 PM, Mike Schinkel <mikeschinkel at newclarity.net>
>>> if ( 'financial-term' == get_post_type($id) )
>> Perfect! Thanks.
> No, it wasn't sarcastic. I'm also not sure how much more clear I could have
> gotten. I literally added is_post_type() today:
> Pass it a post type and a post, and it'll tell you if the post is of that
> type -- that's exactly what scribu proposed for you, only it's simpler.
> The function is more powerful than that -- it can take an array of post
> types to validate the post against. It can also take only a post type, and
> it'll tell you whether that post type is indeed registered.
Sorry, I had a brain-lapse. I elaborated in a private email.
More information about the wp-hackers