Molongui Authorship Pro automatically paginates long author lists to help avoid performance issues when listing many authors. By default this kicks in when more than a certain number of authors is returned. You can already disable automatic pagination in the shortcode with paginate=”0″.
For more advanced control — for example if you want to modify the pagination threshold or disable the forced pagination programmatically — we’ve added filters you can use in your theme or plugin.
Overview of Developer Filters
There are three filters you can use:
molongui_authorship_pro/shortcode/author_list/force_pagination_enabled
Enable or disable forced pagination entirely.
molongui_authorship_pro/shortcode/author_list/force_pagination_enabled
Change the number of authors above which pagination is forced.
molongui_authorship_pro/shortcode/author_list/force_pagination_enabled
Change how many items are shown per page when pagination is forced.
These filters give you control over automatic behavior so you can tailor lists for performance, UX, or custom workflows.
Why These Filters Are Useful
By default, Molongui Authorship Pro forces pagination when the number of authors exceeds a threshold to help prevent server timeouts and slow page loads. The original behavior was based on a hardcoded threshold (previously 30 authors).
Using the filters:
-
You can completely disable the forced pagination programmatically, regardless of count.
-
You can increase or decrease the threshold to suit your site’s size.
-
You can set a custom number of items per page when pagination occurs
These tweaks are especially useful on high-traffic sites or in custom templates where you want more control over list length or performance.
Example: Customizing the Behavior
Add the following code to your theme’s functions.php file or to a custom plugin.
1. Disable Forced Pagination Entirely
add_filter( 'molongui_authorship_pro/shortcode/author_list/force_pagination_enabled', '__return_false' );
This completely turns off the automatic pagination, even if the author list is very large.
2. Increase the Pagination Threshold
This raises the limit so pagination is only forced when there are more than 100 authors.
add_filter(
'molongui_authorship_pro/shortcode/author_list/force_pagination_threshold',
function ( $default ) {
// Only force pagination for 100+ authors
return 100;
}
);
3. Change the Forced Paginate Size
add_filter(
'molongui_authorship_pro/shortcode/author_list/forced_paginate_value',
function ( $default ) {
// Show 25 authors per page when pagination is forced
return 25;
}
);
This sets the pagination size to 25 authors per page whenever forced pagination occurs.
Notes & Best Practices
- These filters only affect the behavior when no explicit paginate attribute is provided in the shortcode.
- If you specify paginate=”0″ in your shortcode, pagination is already disabled at the shortcode level and these filters will not override that.
- Use these filters when you need programmatic control or if shortcode attributes are not sufficient for your use case.
If you need help applying these filters or want custom code examples for your theme or plugin environment, feel free to open a support ticket — we’re here to help!