Opened 3 years ago
Last modified 3 years ago
#53591 new defect (bug)
Firts <ul> missing in wp_list_categories()
Reported by: | sebastienserre | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Taxonomy | Keywords: | needs-patch |
Focuses: | docs, template | Cc: |
Description
Hello,
When using the [wp_list_categories()] function it provides an HTML list starting right by an <li>
without the <ul>
.
Attachments (1)
Change History (5)
#1
@
3 years ago
- Component changed from General to Taxonomy
- Focuses accessibility template added
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 5.9
#2
@
3 years ago
- Focuses accessibility removed
- Milestone changed from 5.9 to Awaiting Review
wp_list_categories()
never has output the full list markup. Not sure where you're seeing a closing </ul>
tag. Neither does wp_list_pages()
and probably other similar functions.
This seems to be more of a lack of documentation issue.
#3
@
3 years ago
- Focuses docs added
I believe this is intentional because it's used within some sidebar widgets that nest the list of categories within another list. Agreed that it needs a docs update.
#4
@
3 years ago
Thank you all for your feedback.
I understand it has been in this situation for a long time, however having a <li> without a <ul> is a syntax problem I think. But i agree, it needs some
Why not adding a default parameter "ul" => false?
That way, current widgets will still be OK and we'll be able to have a correct syntax with this parameter on true.
I can reproduce this issue as well.
And it's even worse: there is no opening
<ul>
tag but we have a closing</ul>
tag :)Moving for 5.9 consideration.