Envira Gallery Documentation

Documentation, Reference Materials and Tutorials for Envira Gallery

How to remove Pagination truncation

Would you like to remove the pagination truncation from the paginated Envira galleries? If you’re not sure what the truncation is, this is the dots that appear in between the page numbers instead of listing all the page numbers.

If you’d like to remove those, we can help you with simple code snippets.

Heads up!

This article contains PHP, CSS, and/or JavaScript to customize our plugin. We offer this code as a courtesy but don’t provide support for additional code customizations or 3rd party development.

To remove the pagination truncation, just add the following code to your site.

If you need help adding custom code to your site, please check out our guide on adding custom PHP or JavaScript to your site.

 
/* Envira - Remove pagination truncation
* 
* @link https://enviragallery.com/docs/how-to-remove-pagination-truncation/
*/

add_filter( 'envira_pagination_link_args', 'test_envira_pagination_link_args', 10, 3 );
function test_envira_pagination_link_args( $pagination_args, $html, $data ) {
$pagination_args['show_all'] = true;
return $pagination_args;
}

After adding the code, check your gallery with numbered pagination. It will now display all the page numbers instead of dots.

Numbered List Pagination

And that’s it! Would you like to now style those pagination links? Check out our article on How to Style Pagination Links.