2016-09-17 485 views

回答

0

發佈答案。 用於獲得分頁的函數如下。設置的參數只有當前頁碼,前面加'PAGE'

$args = array(
    'base'    => '%_%', 
    'format'    => '?paged=%#%', 
    'total'    => 1, 
    'current'   => 0, 
    'show_all'   => false, 
    'end_size'   => 1, 
    'mid_size'   => 1, 
    'prev_next'   => true, 
    'prev_text'   => __('<'), 
    'next_text'   => __('>'), 
    'type'    => 'plain', 
    'add_args'   => false, 
    'add_fragment'  => '', 
    'before_page_number' => 'PAGE', 
    'after_page_number' => '' 
); 

echo paginate_links($args);