Я использую следующий код в своей теме. Код показывает мне заголовок, большой палец и ссылку из дочерних страниц на странице 176. Я хочу, чтобы он не только показывал дочерние страницы, но и контент с 176. Возможно, лучше использовать get_pages или wp_list_pages, но решение для wp_query было бы неплохо. Thx за вашу помощь.Родительская страница и дети Wordpress
function sd_recent() {
global $post;
$this_post = $post->ID;
// args
$args = array(
'post_type' => 'page',
'post_parent' => 176
);
// query
$the_query = new WP_Query($args);
?>
<?php if($the_query->have_posts()): ?>
<ul class="recent-links">
<?php while($the_query->have_posts()) : $the_query->the_post(); ?>
<li <?php if($this_post == $post->ID) { echo ' class="current-recent-links"'; } ?>>
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail('full'); ?>
<span class="recent-links-title"><?php the_title(); ?></span>
</a>
</li>
<?php endwhile; ?>
</ul>
<?php endif; ?>
<?php wp_reset_postdata();
}