How to remove ul styling from wp_list_pages
-
I am trying to add a sidebar of links that link to the fellow child pages of the child page being displayed. How do I remove the automatic ul / li styling that is being added when I place this code into my page:
<?php if($post->post_parent) $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); else $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0"); if ($children) { ?> <p> <?php echo $children; ?> </p> <?php } ?>
I was reading the documentation and it said “By default, wp_list_pages() generates a nested, unordered list of WordPress Pages created with the Write > Page admin panel. You can remove the outermost item (li.pagenav) and list (ul) by setting the title_li parameter to an empty string.”
I am assuming this is what I need to do in order to remove it, but I don’t quite understand what it’s saying in those instructions. Any help is greatly appreciated.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘How to remove ul styling from wp_list_pages’ is closed to new replies.