wpgmp_pagination_css_class - WP Maps Pro

15000+ live websites are using this google maps wordpress plugin.

wpgmp_pagination_css_class

This hook in the WP Maps Pro plugin allows developers to modify the CSS class of the pagination container at runtime. It is useful for customizing the appearance of pagination elements in map displays.

Usage

Developers can implement this hook within their theme’s functions.php file or a custom plugin. It provides the flexibility to add, remove, or modify CSS classes for the pagination container, enabling a consistent look and feel across different themes or specific styling needs.

Example 1

Adding a custom class to the pagination container to apply specific styles.

add_filter('wpgmp_pagination_css_class', function($class, $map) {
    return $class . ' my-custom-pagination-class';
}, 10, 2);

Example 2

Conditionally adding a class based on a map ID to target specific maps only.

add_filter('wpgmp_pagination_css_class', function($class, $map) {
    if ($map->ID == 42) {
        return $class . ' special-map-pagination';
    }
    return $class;
}, 10, 2);

Example 3

Replacing the default class entirely to enforce a uniform style across all maps.

add_filter('wpgmp_pagination_css_class', function($class, $map) {
    return 'uniform-pagination';
}, 10, 2);

Tip: Always ensure that your custom classes do not conflict with existing styles, and test changes across different devices and browsers to maintain a consistent user experience.

Install Plugin Now!

Buy this plugin exclusively on CodeCanyon! You’ll get free updates, full support, and if you’re not satisfied, we’ve got you covered with a 30-day money-back guarantee.