WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 5 years ago

#7716 closed defect (bug) (invalid)

wp_list_categories adds a </p> tag

Reported by: mh79 Owned by:
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.6
Component: Template Keywords:
Focuses: Cc:

Description

when you create a categories list like this

wp_list_categories('title_li=&show_count=1');

and your first category has children you get a </p> tag
behind the counter for this first category link
and this gives a ugly blank line in your list

this is a examle from our website

<li class="cat-item cat-item-80"><a href="http://www.klf.de/home/?cat=80" title="View all posts filed under Articles" class="liinternal">Articles</a> (33)</p> 
<ul class='children'>

Change History (5)

comment:1 mh796 years ago

  • Component changed from General to Template
  • Version set to 2.6

comment:2 sivel6 years ago

Just tested this and cannot duplicate. No ending p tag is added.

comment:3 mh795 years ago

It could be that my description has not enough information.

we have a two level category stucture
no post is in the first level,
all post are in the second level.

When we use wp_list_categories('title_li=&show_count=1');

we get a list where the first link has a <p> tag,
this link is a link to a category in the first level with childs (in the scond level)
no other link in the list in the first or second level have a <p> tag

when we add a category which is sorted before this category with the <p> tag,
and we add a post to this new category so a new link to this category will appear in the list,
and then no more <p> will be in the list

this is our current fix, but this is not a good solution

comment:4 DD325 years ago

  • Milestone set to 2.8

comment:5 sivel5 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Tested per the instructions and have found this to be invalid.

Note: See TracTickets for help on using tickets.