Envira Gallery Documentation
Documentation, Reference Materials and Tutorials for Envira Gallery
Documentation, Reference Materials and Tutorials for Envira Gallery
Would you like to remove the pagination truncation from 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 walk you through how to do that!
We’ll begin by creating a custom plugin. Just add the following code to a new file at wp-content/plugins/envira-remove-pagination-truncation.php
.
<?php /** * Plugin Name: Envira Gallery - Remove pagination truncation * Plugin URI: https://enviragallery.com * Version: 1.0 * Author: Envira Gallery Team * Author URI: https://enviragallery.com * Description: Removes the dots from the pagination and replaces them with a complete number count. */ 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; }
If you’re unsure how to create a plugin file, follow these steps below:
envira-remove-pagination-truncation.php
.Your final step is to activate the plugin you just uploaded. Simply navigate to the Plugins from within your WordPress dashboard and activate the Envira Gallery – Remove pagination truncation plugin.
And that’s it! Would you like to now style those pagination links? Check out our article on How to Style Pagination Links.