如何讓一個頁面的孩子們的大孩子?如何讓孩子們和他們的大孩子
<?php
global $post;
$pages = get_children(array(
'post_parent' => $post->ID,
'numberposts' => -1
));
if ($pages):
$rows = array_chunk($pages, ceil(count($pages)/3)); ?>
<div class="row">
<?php foreach ($rows as $row): ?>
<div class="col-sm-4">
<ul class="list-unstyled">
<?php foreach ($row as $city): ?>
<li><a href="<?= get_permalink($city) ?>"><?= $city->post_title ?></a></li>
<?php endforeach; ?>
</ul>
</div>
<?php endforeach; ?>
</div>
<?php endif;
使用wp_list_pages我不能爲我的名單
檢查了這一點https://wordpress.stackexchange.com/questions/247858/wp-list-pages-change-output-of-hyperlink – Noman