代码如下:
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);
}
以下是输出:
<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>
问题:为什么函数返回“额外”页面文本“页面”如何摆脱它?