Removing crap li tags
-
Hi All,
so I have two problems both having to deal with un-needed li tags. Seems word press really likes it’s lists and they are driving me crazy.the first and most important is with my navigation:
$list = wp_list_pages( array('echo' => 0, 'title_li' => __(' ')) ); $list = preg_replace('/title=\"(.*?)\"/','',$list); echo $list;I’m using wp_list_pages and removing the title tags then out putting the menu. but it wraps the menu in an li tag. I need to know how to get rid of this I want:
<ul> <li>Nav 1</li> <li>Etc...</li> </ul>but I’m getting:
<li class="pagenav"> <ul> <li>Nav 1</li> <li>Etc...</li> </ul> </li>I’m also having problems with my sidebar. Most of my sidebar elements are custom widgets so they are not a big deal but I have one that is a text widget and it is doing the same thing. wrapping itself in an li tag. is there anything I can do – apart from editing the source files?
Thanks
The topic ‘Removing crap li tags’ is closed to new replies.