[wp-trac] [WordPress Trac] #14625: Function get_the_category doesn't work as expected with custom post types
WordPress Trac
wp-trac at lists.automattic.com
Mon Sep 13 17:22:45 UTC 2010
#14625: Function get_the_category doesn't work as expected with custom post types
-------------------------------+--------------------------------------------
Reporter: bjdj | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone:
Component: General | Version: 3.0.1
Severity: minor | Resolution:
Keywords: reporter-feedback |
-------------------------------+--------------------------------------------
Changes (by bjdj):
* status: closed => reopened
* resolution: worksforme =>
Comment:
Again, I got some 'unexpected' behaviour on the category page. I don't
know if this behaviour is a bug or not, so that's the reason I am posting
this at this ticket.
Scenario:
You print $post (using print_r($post) for example) on a category page. The
array $post is filled with data from the '''last post''' in the category.
To be more precise, the last post that has '''post_type = post'''.
I notice two things:
1) Should the $post variable be set at all on the category pages?
2) If so, why does it contain the latest post with post_type = post. It
seems more logical to me to fill it with the latest post, of any
post_type.
Thanks in advance.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14625#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list