Opened 6 years ago
Last modified 5 years ago
#43002 new defect (bug)
Can't order tag cloud by tag_cloud_sort filter
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Taxonomy | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
I can't re-order tags by tag_cloud_sort filter, because the order is same with id order.
Change History (3)
#2
in reply to:
↑ 1
@
6 years ago
Replying to birgire:
@yuetyeelo2855 Welcome to WordPress trac.
Can you please extend the bug report,
e.g. with an example so it can easily be reproduced and verified.
Thanks.
It is no common case, If the user create tag like
tag1[id=1], tag2[id=2], tag3[id=3]
want the tage order like
tag1[id=1, post_count=5], tag2[id=2, post_count=20], tag3[id=3, post_count=10]
so using WordPress filter tag_cloud_sort to order by extra column tag_order
tag1[id=1, tag_order=1], tag2[id=2, tag_order=2], tag3[id=3, tag_order=3]
but the order will not work. it will follow the post count.
ASC:
tag1[id=1, post_count=5], tag3[id=3, post_count=10], tag2[id=2, post_count=20]
DESC:
tag2[id=2, post_count=20], tag1[id=1, post_count=5], tag3[id=3, post_count=10]
Can we re-order the order of logic, make the default order go first, than exec the filter tag_cloud_sort.
the position wp-includes/category-template.php line no. 821-844
@yuetyeelo2855 Welcome to WordPress trac.
Can you please extend the bug report,
e.g. with an example so it can easily be reproduced and verified.
Thanks.