Linux 软件免费装
Banner图

WP-Paginate

开发者 maxfoundry
emartin24
AlanP57
更新时间 2024年3月26日 20:47
PHP版本: 2.6.0 (2.7.0 for comments pagination) 及以上
WordPress版本: 6.5
版权: GPLv2 or later
版权网址: 版权信息

标签

page comments seo navigation pagination usability rtl paginate wp-paginate

下载

1.2 1.2.2 2.1.7 2.2.0 2.2.2 1.3.1 1.3.2 1.3.3 1.3.4 2.0.0 2.0.1 1.0.1 1.1 1.1.1 1.2.1 1.2.3 1.2.4 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 1.1.2 1.2.5 1.3 1.0 2.1.8 2.1.9 2.2.1

详情介绍:

Latest News WP-Paginate is a simple and flexible pagination plugin which provides users with better navigation on your WordPress site. In addition to increasing the user experience for your visitors, it has also been widely reported that pagination increases the SEO of your site by providing more links to your content. You can add custom CSS for your pagination links with the Custom CSS tab in WP-Paginate Settings. Starting in version 1.1, WP-Paginate can also be used to paginate post comments! Translations: http://plugins.svn.wordpress.org/wp-paginate/I18n (check the version number for the correct file)

安装:

Install and Activate
  1. Unzip the downloaded WP-Paginate zip file
  2. Upload the wp-paginate folder and its contents into the wp-content/plugins/ directory of your WordPress installation
  3. Activate WP-Paginate from Plugins page
Implement You can now configure the location and appearance of pagination links through WP-Paginate Settings rather than edit your theme files. See the Configure section. For posts pagination: For the Twenty Seventeen theme, in index.php, replace: the_posts_pagination( array( 'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '' . ( 'Previous page', 'twentyseventeen' ) . '', 'next_text' => '' . ( 'Next page', 'twentyseventeen' ) . '' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ), 'before_page_number' => '' . __( 'Page', 'twentyseventeen' ) . ' ', ) ); With: if(function_exists('wp_paginate')): wp_paginate(); else : the_posts_pagination( array( 'prev_text' => twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '' . ( 'Previous page', 'twentyseventeen' ) . '', 'next_text' => '' . ( 'Next page', 'twentyseventeen' ) . '' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ), 'before_page_number' => '' . __( 'Page', 'twentyseventeen' ) . ' ', ) ); endif; For the Twenty Sixteen theme, in index.php, replace: the_posts_pagination( array( 'prev_text' => ( 'Previous page', 'twentysixteen' ), 'next_text' => ( 'Next page', 'twentysixteen' ), 'before_page_number' => '' . __( 'Page', 'twentysixteen' ) . ' ', ) ); With: if(function_exists('wp_paginate')): wp_paginate(); else : the_posts_pagination( array( 'prev_text' => ( 'Previous page', 'twentysixteen' ), 'next_text' => ( 'Next page', 'twentysixteen' ), 'before_page_number' => '' . __( 'Page', 'twentysixteen' ) . ' ', ) ); endif; For the Twenty Fifteen theme, in index.php, replace: the_posts_pagination( array( 'prev_text' => ( 'Previous page', 'twentyfifteen' ), 'next_text' => ( 'Next page', 'twentyfifteen' ), 'before_page_number' => '' . __( 'Page', 'twentyfifteen' ) . ' ', ) ); With: if(function_exists('wp_paginate')): wp_paginate(); else : the_posts_pagination( array( 'prev_text' => ( 'Previous page', 'twentyfifteen' ), 'next_text' => ( 'Next page', 'twentyfifteen' ), 'before_page_number' => '' . __( 'Page', 'twentyfifteen' ) . ' ', ) ); endif; For comments pagination:
  1. Open the theme file(s) where you'd like comments pagination to be used. Usually this is the comments.php file.
  2. Replace your existing previous_comments_link() and next_comments_link() code block with the following:
Configure
  1. Configure the WP-Paginate settings, if necessary, from the WP-Paginate option in the Settings menu
  2. The styles can be changed with the following methods:
  3. Add a wp-paginate.css file in your theme's directory and place your custom CSS there
  4. Add your custom CSS to your theme's styles.css
  5. Modify the wp-paginate.css file in the wp-paginate plugin directory
Note: The first two options will ensure that WP-Paginate updates will not overwrite your custom styles. Upgrading To 1.1.1+:

常见问题:

How can I override the default pagination settings?

The wp_paginate() and wp_paginate_comments() functions each takes one optional argument, in query string format, which allows you to override the global settings. The available options are:

  • title - The text/HTML to display before the pagination links
  • nextpage - The text/HTML to use for the next page link
  • previouspage - The text/HTML to use for the previous page link
  • before - The text/HTML to add before the pagination links and title
  • after - The text/HTML to add after the pagination links
  • empty - Display before markup and after markup code even when the page list is empty
  • range - The number of page links to show before and after the current page
  • anchor - The number of links to always show at beginning and end of pagination
  • gap - The minimum number of pages before a gap is replaced with an ellipsis (...)
You can even control the current page and number of pages with:
  • page - The current page. This function will automatically determine the value
  • pages - The total number of pages. This function will automatically determine the value
Example (also applies to wp_paginate_comments()):

How can I style the comments pagination differently than the posts pagination?

When calling wp_paginate_comments(), WP-Paginate adds an extra class to the ol element, wp-paginate-comments.

更新日志:

2.2.2 2.2.1 2.2.0 2.1.9 2.1.8 2.1.7 2.1.6 2.1.5 2.1.4 2.1.3 2.1.2 2.1.1 2.1.0 2.0.9 2.0.8 2.0.7 2.0.6 2.0.5 2.0.4 2.0.3 2.0.2 2.0.1 2.0.0 1.3.4 1.3.3 1.3.2 1.3.1 1.3 1.2.6 1.2.5 1.2.4 1.2.3 1.2.2 1.2.1 1.2 1.1.2 1.1.1 1.1 1.0.1 1.0