treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Wordpress wp_list_pages

  • The Question
    I'm not an expert on Wordpress, but I am learning fast. I understand that the wp_list_pages generate <li> markup for each page within wordpress. Lets say I have the following markup for the static HTML page..

    The Nav

    <li><span class=\"button\"><span class=\"left\"></span><span class=\"center\"><a href=\"#\">Home</a></span><span class=\"right\"></span></span></li>

    The <span> tags are used there to create my rounded border and reflective material under the button. (I also have the box expandable)
    But when i insert the Wordpress wp_list_pages I won't get the following output without editing the core wordpress include files. My question is there a way that I can make this work without editing the core include files. I'm looking at this to be a theme and do not want to require the user to edit the core wordpress files to make this work. In the case that if they want to change themes, my theme might potentially break the other themes due to the change in the include file..
  • Check out the codex:
    http://codex.wordpress.org/Template_Tags/wp_list_pages

    I think the link_before and link_after paramaters might be able to help.
  • Thanks, Chris for the help.. I didn't realize it was added in 2.7..