需要链接到分页的最后一页

所以我使用常规分页

previous_posts_link('<');  // using previous icon like this couse of easyer styling
echo paginate_links( $args ) ;
global $wp_query;
$big = 999999999;
echo paginate_links( array(
    'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('paged') ), 'total' => $wp_query->max_num_pages, 'prev_text'    => __(''), 'next_text'    => __(''), 'mid_size'     => 2
) );
next_posts_link('>');     // using next icon like this couse of easyer styling

所以我的分页看起来像这样, 它具有下一个和上一个图标以及页码:

<1 2 3>

我还需要使用这2个图标转到分页的第一页和最后一页

<<和>>

所以我想出了如何转到分页的第一页, 因为在我的索引页上, 我只链接了这两个图标:<<与此:

bloginfo('wpurl');

所以我的问题是如何转到分页的最后一页? fkors我的分页应如下所示:

<< <1 2 3> >>


#1


有预编译的wordpress函数, 可调用下一页和最后一页链接

来源:

https://www.srcmini02.com/67410.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_40071.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?