答案 0 :(得分:3)
答案 1 :(得分:0)
答案 2 :(得分:0)
// Get the page's children
$children = get_pages('child_of=' . $post->ID. '&depth=-2' );
if (!empty($children)) {
echo '<ul class="localPlaces">';
foreach($children as $child) {
// Get the 2 meta values from the child page
$details6 = get_post_meta($child->ID, 'address 1', true);
$details7 = get_post_meta($child->ID, 'number', true);
$details8 = get_the_title($child->ID);
// Display the meta values
echo '<h3>'. $details8 . '</h3>';
echo '<li>' . $details6 . ' ' . $details7 . '</li>';
}
echo '</ul>';
}
此方法至少显示帖子的标题