就这样结束了。进行了这些更改,并取得了成效:
已更改:
\'base\' => str_replace($big,\'%#%\',esc_url(get_pagenum_link($big))),
进入:
\'base\' => get_permalink( $post->post_parent ) . \'%_%\',
并更改:
\'format\' => \'?paged=%#%\',
进入:
\'format\' => \'paged=%#%\',
然后添加了一个带有重写标记和规则的筛选器:
add_filter(\'init\', \'post_gallery_add_rewrite_tag_rule_2022\');
function post_gallery_add_rewrite_tag_rule_2022() {
add_rewrite_tag(\'%current%\',\'([^&]+)\');
add_rewrite_rule(\'([^/]+)/paged=/?([0-9]{1,})/?$\', \'index.php?name=$matches[1]&paged=$matches[2]\', \'top\');
}
然后(上传functions.php后)在WordPress管理面板中:
设置->;永久链接->;[保存更改]