好的,伙计,将此代码添加到您的函数中。php
//This function is responsible for splitting posts and pages using <!--nexpage-->
function my_link_pages() {
$paged_page_nav = wp_link_pages(
array(
\'before\' => \'<div class="page-navigation"><ul><li class="pages">\' . esc_html__( \'Pages:\', \'domain\' ) . \'</li>\',
\'after\' => \'</ul></div>\',
\'link_before\' => \'<span>\',
\'link_after\' => \'</span>\',
\'echo\' => false
)
);
//Add "current" and "page_divide" classes to our links
//READ: http://wordpress.stackexchange.com/questions/17421/wp-link-page-wrap-current-page-element
// Now let\'s wrap the nav inside <li>-elements
$current_class = \'current\';
$classes = \'page_divide\';
$paged_page_nav = str_replace( \'<a\', \'<li class="\'. $classes .\'"><a\' ,$paged_page_nav );
$paged_page_nav = str_replace( \'</span></a>\', \'</a></li>\', $paged_page_nav );
$paged_page_nav = str_replace( \'"><span>\', \'">\', $paged_page_nav );
//Add "current" class
$paged_page_nav = str_replace( \'<span>\', \'<li class="\'. $current_class .\'">\', $paged_page_nav );
$paged_page_nav = str_replace( \'</span>\', \'</li>\', $paged_page_nav );
echo $paged_page_nav ;
}
然后在你的单曲里打电话。php类似:
<?php my_link_pages(); ?>
确保添加
<!--nexpage-->
在您的后期编辑屏幕上(选择文本非视觉)