Make WordPress Core

Opened 16 years ago

Closed 15 years ago

Last modified 9 years ago

#7716 closed defect (bug) (invalid)

wp_list_categories adds a </p> tag

Reported by: mh79's profile mh79 Owned by:
Milestone: 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 (6)

#1 @mh79
16 years ago

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

#2 @sivel
16 years ago

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

#3 @mh79
16 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

#4 @DD32
16 years ago

  • Milestone set to 2.8

#5 @sivel
15 years ago

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

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

#6 @DrewAPicture
9 years ago

  • Milestone 2.8 deleted
Note: See TracTickets for help on using tickets.