rem_fotorama_attrs
This filter is responsible for all the settings related to the Gallery Slider Thumbnails, on the Single Property Page. We’re using the Fotorama library here.
Default settings that we’re using are defined below
- allowfullscreen => true
- width => Getting from Settings
- height => Getting from Settings
- fit => Getting from Settings
- max-width => 100%
- nav => thumbs
- transition => slide
Now suppose you want to add some more settings from Fotorama API, and with this, you also want to modify some of the default values. Let’s say the following settings you need
- max-width => 1150
- max-height => 100%
- ratio => 16/9
- min-width => 400
- min-height => 300
You have to paste the following code inside the functions.php file of your theme to achieve this
add_filter( 'rem_fotorama_attrs', 'rem_fotorama_custom', 10, 1 ); function rem_fotorama_custom($attrs){ $attrs['max-width'] = '1150'; $attrs['max-height'] = '100%'; $attrs['ratio'] = '16/9'; $attrs['min-width'] = '400'; $attrs['min-height'] = '300'; return $attrs; }