Skip to content

Instantly share code, notes, and snippets.

@bradvin
Last active September 26, 2021 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradvin/4ce8bb7640c18de9889235fc293c2e89 to your computer and use it in GitHub Desktop.
Save bradvin/4ce8bb7640c18de9889235fc293c2e89 to your computer and use it in GitHub Desktop.
FooGallery - Override the paging for every gallery, no matter what settings
function override_foogallery_paging($foogallery) {
$paging_options = array(
'type' => 'dots', // or pagination, infinite or loadMore
'theme' => 'fg-light', // or fg-dark
'size' => 5, // page size
'position' => 'top', // or bottom or both
'scrollToTop' => 'false', // or true
'output' => '',
);
foogallery_current_gallery_set_cached_value( 'paging', $paging_options );
}
add_action( 'foogallery_located_template', 'override_foogallery_paging', 99, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment