您可以使用format
的参数wp_link_pages
功能如下:
<?php $args = array(
\'base\' => \'%_%\',
\'format\' => \'?page=%#%\',
\'total\' => 1,
\'current\' => 0,
\'show_all\' => False,
\'end_size\' => 1,
\'mid_size\' => 2,
\'prev_next\' => True,
\'prev_text\' => __(\'« Previous\'),
\'next_text\' => __(\'Next »\'),
\'type\' => \'plain\',
\'add_args\' => False,
\'add_fragment\' => \'\',
\'before_page_number\' => \'\',
\'after_page_number\' => \'\'
); ?>
<div class="pagelink"><?php echo paginate_links( $args ); ?></div>