[wp-trac] [WordPress Trac] #19757: the_category() should include depth
WordPress Trac
wp-trac at lists.automattic.com
Fri Jan 6 09:24:06 UTC 2012
#19757: the_category() should include depth
--------------------------+-----------------------------
Reporter: jordash56 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
--------------------------+-----------------------------
I've noticed a lot of category functions don't have depth attributes built
into them.
The default usage of the_category() results in poorly formatted category
listings for more complicated category structures (using Wordpress as a
CMS).
Here's an example: http://bestappsrated.com/android-apps/
If you look at some of the post listings, you'll notice each category is
duplicated, that's because their is 3 levels (depth) to that post.
If there was a depth option for the the_category()
for example allowing: the_category(', ', 'depth=2')
It would completely circumvent that problem, And allow a huge amount of
flexibility and greater use of Categories withing wordpress, without
forcing themer writing custom loops and for statements.
Here's another article where there's frustration that this function (and
similar category functions) doesn't have a depth parameter:
http://www.wpbeginner.com/wp-themes/how-to-display-only-parent-category-
in-your-wordpress-post-loop/
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19757>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list