0
Я хочу скрыть <h2>title</h2>
, если они не являются страницами детей.Показать заголовок, только если контент
<h2> title</h2></br>
<?php
// Globalize the $post variable;
// probably already available in this context, but just in case...
global $post;
wp_list_pages(array(
'title_li' => __(''),
// Only pages that are children of the current page
'child_of' => $post->ID,
// Only show one level of hierarchy
'depth' => 1,
));
?>
Вы можете добавить код о том, как мы можем проверить, нет ли детских страниц? – moffeltje