我试图遍历父页面并显示标题,内容和永久链接。一切都按预期工作,除了the_content()根本没有显示任何内容。我将其放在自定义页面模板中,以便我可以将其用于整个网站的其他页面。关于我做错了什么的任何想法?
$pageID = $wp_query->post->ID;
$child_pages = new WP_Query( array(
'post_type' => 'page',
'posts_per_page' => 4,
'post_parent' => $pageID,
'no_found_rows' => true
) );
while ( $child_pages->have_posts() ) : $child_pages->the_post();
the_title();
the_content(); // Also tried apply_filters, didn't work :(
echo '<br>';
get_the_post_thumbnail();
endwhile;
wp_reset_postdata();