WordPress.org

Ready to get started?Download WordPress

Forums

wp_list_pages remove the li (2 posts)

  1. simonsays
    Member
    Posted 6 years ago #

    Hi all -

    I'm new to Word Press but already enjoying the custom features of it. My question is how do I modify the wp_list_pages to not give a list of the pages prefixing them all with <li class="page_item...">

    I essentially want to replace:

    <li class="page_item page-item-2"><a href="http://server1/site2/?page_id=2" title="About">About</a></li>
    <li class="page_item page-item-3"><a href="http://server1/site2/?page_id=3" title="Contact Us">Contact Us</a></li>

    with

    <div class="mydiv"><a href="http://server1/site2/?page_id=2" class="myhrefclass" title="About">About</a></div>
    <div class="mydiv"><a href="http://server1/site2/?page_id=3" class="myhrefclass" title="Contact Us">Contact Us</a></div>

    Any idea on how to do this?

  2. moshu
    Member
    Posted 6 years ago #

    You cannot, unless you make your own function/plugin for that.

    What's wrong with the li? Having their own classes you can style them in whichever way you want...

Topic Closed

This topic has been closed to new replies.

About this Topic