• HI, have a little problem with wp_list_pages.

    Right now i have this:
    <?php wp_list_pages(‘title_li=’); ?>

    And the generated HTML brings me this code:

    <span><li class=”page_item page-item-2″>about
    </span>

    but i want ti to be like this:
    <li class=”page_item page-item-2″><span>about</span>

    How can i do that ?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Valerio Vaz

    (@vvaz)

    damm sorry… the code that HTML gives me is:

    <span><li class="page_item page-item-2"><a href="https://exemple.com/">home</a></li>
    </span>

    and i want it to be:

    <li class="page_item page-item-2"><a href="https://exemple.com/"><span>home</span></a></li>
    </span>

    I′m not sure but I believe you can′t do this without hacking WordPress core files. If you look in the codex I see there no chance to put span-tags (or a seperator) into the created list.

    You can add spans to give <li><span><a href="#">Link</a></span></li> using Page Lists Plus.

    Will that do?

    – Tim

    This cured a big freakin’ headache for me. (Page Lists Plus) Thanks so much! ??

    Cheers!
    Jay

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘wp_list_pages html problem’ is closed to new replies.