在一个页面中,我将长文章按下一页拆分,并显示页码或下一页/上一页选项。但我想同时显示number和next-previous选项。这是我的单页截图,一个是下一个上一个,另一个是数字选项。我的代码是:
function custom_nextpage_links($defaults) {
$args = array(
\'before\' => \'<ul class="my-paginated-posts"><ul><li>\' . __( \'Section:\', \'textdomain\' ),
\'after\' => \'</li></ul>\',
\'link_before\' => \'<span class="page-link">\',
\'link_after\' => \'</span>\',
\'separator\' => \' \',
\'nextpagelink\' => __(\'Next »\', \'textdomain\'),
\'next_or_number\' => \'\',
\'previouspagelink\' => __( \'« Previous\', \'textdomain\' ),
\'pagelink\' => \'%\',
\'echo\' => 1
);
$r = wp_parse_args($args, $defaults);
return $r;
}
add_filter(\'wp_link_pages_args\',\'custom_nextpage_links\');