使用get_post_field(\'post_content\', $product_page->ID )
获取循环外部的内容。
<?php
$product_pages_args = array(
\'meta_key\' => \'_wp_page_template\',
\'meta_value\' => \'page_library_html.php\'
);
$product_pages = get_pages( $product_pages_args );
?>
<?php
foreach ( $product_pages as $product_page ) {
echo \'<div id="posts" class="flex_100">\';
echo \'<div id="library_title"><a href="\' . get_permalink( $product_page->ID ) . \'">\' . $product_page->post_title . \'</a></div>\';
echo \'<div class="page-content">\' . get_post_field(\'post_content\', $product_page->ID ) . \'</div></div>\';
}
?>