Support » Fixing WordPress » Adding a <span></span> in the title_li

  • Hey PressSmarties,
    I am fairly new to php and don’t quite yet understand the logic. In this expression <?php wp_list_pages('title_li='); ?> how would I successfully add an opening <span> and a closing </span> on the outsides of what normally forms and renders this html ,

    <ul>    
    
    <li class="page_item page-item-2">
    <a href="#" title="About">About</a>
    </li>
    
    <li class="page_item page-item-3">
    <a href="#" title="#">LinkTwoPageTwo</a>
    </li>
    
    </ul>

    My goal is to achieve this here,

    <ul>
    <li class="page_item page-item-2">
    <a href="#" title="About"><span>About</span></a>
    
    <li class="page_item page-item-3">
    <a href="#" title="#"><span>LinkTwoPageTwo</span></a>
    
    </ul>

    ^^ with the span tags outlining the link.

    Thanks for the support,
    <3 WordPress

Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Adding a <span></span> in the title_li’ is closed to new replies.