是的,现在可以了!谢谢
我用这个密码[\'next_or_number\'] == \'next_and_number\')
因此,我可以将其与数字、箭头或图形混合使用:
// Custom Next/Previous Page
add_filter(\'wp_link_pages_args\', \'wp_link_pages_args_prevnext_add\');
/**
* Add prev and next links to a numbered link list
*/
function wp_link_pages_args_prevnext_add($args)
{
global $page, $numpages, $more, $pagenow;
if (!$args[\'next_or_number\'] == \'next_and_number\')
return $args; # exit early
$args[\'next_or_number\'] = \'number\'; # keep numbering for the main part
if (!$more)
return $args; # exit early
if($page-1) # there is a previous page
$args[\'before\'] .= _wp_link_page($page-1)
. $args[\'link_before\']. $args[\'previouspagelink\'] . $args[\'link_after\'] . \'</a>\'
;
if ($page<$numpages) # there is a next page
$args[\'after\'] = _wp_link_page($page+1)
. $args[\'link_before\'] . $args[\'nextpagelink\'] . $args[\'link_after\'] . \'</a>\'
. $args[\'after\']
;
return $args;
}
要获取分页导航:
<?php
wp_link_pages(array(
\'before\' => \'<div class="pagenav">\' . __(\'\'),
\'after\' => \'</div>\',
\'next_or_number\' => \'next_and_number\', # activate parameter overloading
\'nextpagelink\' => __(\'<img src="\'.get_bloginfo(\'template_url\').\'/images/nxt_btn.png" />\'),
\'previouspagelink\' => __(\'<img src="\'.get_bloginfo(\'template_url\').\'/images/prv_btn.png" />\'),
\'pagelink\' => \'%\',
\'echo\' => 1 )
);
?>
谢谢大家!
公元