Cannot strip li coding from category listing
-
I’m running WP2.1 (www.dmk.com.au) — and cannot remove the opening and closing
<li>and</li>coding from the category listing in my sidebar.I’m using the new wp_list_categories info info for 2.1.
There is some wrong info on this page about the “title_li” parameter — it says it is boolean, but then gives no true/false options. However, I found using title_li=0 worked as an argument. But — when I removed this parameter from my code, the
<li>tags stayed (despite the page saying that they would be removed from display).I see though in the Codex there is mention of a “sytle” parameter for wp_list_categories, but there no information provided yet in the docs on how to use that (maybe it will be covering the use of unordered lists?).
I’ve had no problems with stripping
<li>tags from my pages listing, using this thread. That approach also worked for bookmarks using the new wp_list_bookmarks.But alas, not for categories. I cannot use that same approach here. I don’t want
<li>tags for each category entry, just a<br />will do fine.I can live with the current situation for now, but it in the long run I’d like to see this work properly!
Any thoughts/solutions/workarounds, without hacking the core? I cannot find anything in Support Forums or docs about this, or even via Google.
-
Any thoughts on this one?
Have you tried
wp_list_categories('style=none');?Thanks Otto42, this worked! The Codex page for this template tag had no info for the style parameter, so I hadn’t yet been able to use that until your suggestion.
This way changes the
<li>and</li>into a<br />— which is exactly what I needed!Thanks again!
Instead of letting WP output my categorie list directly to my blog I chosed to put it in an array so you can change it anyway you want with php. The result is a plugin with help file located that can be found here.
The topic ‘Cannot strip li coding from category listing’ is closed to new replies.