我有一个页面,其中列出了此特定页面的子页面,但我想为其添加分页,如何才能做到这一点?
这是获取页面的代码
<ul id="products" class="items-thumbs">
<?php
$the_id = get_the_ID();
$args = array(
\'child_of\' => $the_id,
\'title_li\' => \'\',
\'parent\' => $the_id,
\'sort_order\' => \'ASC\',
\'sort_column\' => \'ID\',
\'number\' => 20
);
$pages = get_pages( $args );
$output = \'\';
foreach($pages as $value){
$thumb = get_the_post_thumbnail( $value->ID, $attr = \'\' );
$output .= "<li>";
$output .= "<a href=\'" . $value->post_name . "\' >" . $thumb;
$output .= $value->post_title . "</a>";
$output .= "</li>";
}
echo $output;
?>
</ul>