-
-
Notifications
You must be signed in to change notification settings - Fork 113
Pagination
To use pagination, you need to set the following parameters in the shortcode:
-
pagination set it to yes.
[catlist pagination=yes] -
numberposts - Posts per page are set with the
numberpostsparameter.[catlist pagination=yes numberposts=5] -
instance (only necessary when using the shortcode with pagination more than once in the same page/post) - a number or name to identify the instance where you are using pagination. Since you can use the shortcode several times in the same page or post, you need to identify the instance so that you paginate only that instance.
Example:
[catlist id=3 numberposts=5 pagination=yes instance=1]
[catlist id=5 numberposts=15 pagination=yes instance=2]
You can customize what to show for the "next" and "previous" buttons in the pagination navigation. Use the following params:
- pagination_prev - Replace the "<<" characters in the "previous" button in the pagination navigation with a custom text.
- pagination_next - Replace the ">>" characters in the "next" button in the pagination navigation with a custom text.
You can also set a default value for pagination in the Options Page. This will apply every time you use the shortcode. You can override the option by using pagination='yes' and pagination='no' in the shortcode.
If you want to customize the way the pagination is displayed, you can
copy the lcp_paginator.css file from the plugin's directory to your
theme's directory and customize it. Do not customize the file on the
plugin's directory since this file will be overwritten every time you
update the plugin.
The current page in pagination has its own CSS class:
<li class='lcp_currentpage'>current_page</li>
So you can style the current page number differently if you want to.