• With the wordpress list pages statement:

    <?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>

    Is there any way to add a <span> tag before and after the link? Or any other way I could do this?

    Eg:

    <li class="page_item current_page_item"><a href="#" title="home"><span>home</span></a></li>
    <li class="page_item"><a href="#" title="about"><span>about</span></a></li>
    <li class="page_item"><a href="#" title="contact"><span>contact</span></a></li>

    Thanks…

Viewing 1 replies (of 1 total)
  • Thread Starter checksum

    (@checksum)

    I’ve sorted this:

    $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_page_link($page_id) . '" title="' . wp_specialchars($title) . '"><span>' . $title . '</span></a>';

    wp-includes/template-functions-post.php

Viewing 1 replies (of 1 total)
  • The topic ‘add an extra html tag to wordpress list pages statement’ is closed to new replies.