title: Wordpress WP_LIST_PAGES insert span
body: <p>I have this code:</p>
  
  <pre><code>if($post-&gt;post_parent)
  $children = wp_list_pages("title_li=&amp;child_of=".$post-&gt;post_parent."&amp;echo=0");
  else
  $children = wp_list_pages("title_li=&amp;child_of=".$post-&gt;ID."&amp;echo=0");
  if ($children) { ?&gt;
  &lt;ul id="siderbar_menuchild"&gt;
  &lt;?php echo $children; ?&gt;
  &lt;/ul&gt;
  &lt;?php } ?&gt;
  </code></pre>
  
  <p>The result is:</p>
  
  <pre><code>&lt;ul&gt;
  &lt;li&gt;&lt;a href="page_link"&gt;page_name&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="page_link"&gt;page_name&lt;/a&gt;&lt;/li&gt;
  etc...
  &lt;/ul&gt;
  </code></pre>
  
  <p>Now this is what I want to display:</p>
  
  <pre><code>$text1="text1"
  $text2="text2"
  $text3="text3"
  etc...
  
  &lt;ul&gt;
  &lt;li&gt;&lt;a href="page_link"&gt;page_name&lt;span&gt;text1&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="page_link"&gt;page_name&lt;span&gt;text2&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  etc...
  &lt;/ul&gt;
  </code></pre>
  
  <p>Any help is appreciated. 
  Thanks.</p>
  
  <p>LE: Ok I put the following line:</p>
  
  <pre><code>$children = str_replace('&lt;/a&gt;', '&lt;span&gt;&lt;/span&gt;&lt;/a&gt;', $children);
  </code></pre>
  
  <p>And now the tags placement is good. </p>
  
  <p>But I still have to find a way how to put different text to each span.</p>
  
  <p>LE2: I used jquery to insert text, didn't found any PHP method, I used the following line:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(".page-item-53 span").text("Your text here Your text here Your text here");
  &lt;/script&gt;
  </code></pre>
  
  <p>So I solved my problem, but if you have any other better way in doing this, you can post here your solution.</p>