Extra title output with this function wp_list_pages

here is the code :

add_shortcode ('get_menu_child','get_menu_child');
   function get_menu_child ($att) {

       global $wp_query;
       $thePostID = $wp_query->post->ID;

       $output = '';
       $output .= '<div class="childbutton">';
       $output .= wp_list_pages("echo=0&child_of=5&exclude=".$thePostID."");
       $output .= '</div>';

    return do_shortcode($output);
   } 

here is the output :

Read More
<div class="childbutton">
<li class="pagenav">Pages<ul>
<li class="page_item page-item-46"><a href="#">Culte et culture</a></li>
<li class="page_item page-item-49"><a href="#">Écoles</a></li>
<li class="page_item page-item-43"><a href="#">Organismes communautaires</a></li>
<li class="page_item page-item-52"><a href="#">Parcs et camping</a></li>
<li class="page_item page-item-40"><a href="#">Tourisme</a></li>
</ul></li></div></p>
</div>

Question why the function return a “extra” pages text “PAGES”
how to get rid of it ?

Related posts

Leave a Reply

1 comment