我想得到显示多个网页的内容在一个网页上的短代码。如果我使用return $html;
如果我使用return do_shortcode($html);
短代码正常工作,但页面内容已消失。有效的解决方案是什么?
function get_page_func( $atts ){
extract(shortcode_atts( array(
\'title\' => \'\'
), $atts ) );
$page = get_page_by_title($title);
$args = array(
\'include\' => $page->ID,
);
$pages = get_pages($args);
$html = $pages[0]->post_content;
return do_shortcode($html);
}
add_shortcode( \'get_page\', \'get_page_func\' );