[ad_1]
Hi there!
Yes, you can show the opening hours in the info window, pretty much in the same way you can show them in the result list (see screenshot).
For this, you can add a small snippet like this in your ‘wpsl_info_window_template’ filter:
if ( !$wpsl_settings['hide_hours'] ) {
$info_window_template .= "\t\t\t" . '<% if ( hours ) { %>' . "\r\n";
$info_window_template .= "\t\t\t" . '<p><%= hours %></p>' . "\r\n";
$info_window_template .= "\t\t\t" . '<% } %>' . "\r\n";
}I hope that helps.
Regards,
Thanks for your reply @farroyob. I’ve added the openings hours with that snippet.
One more question though, is it true that you can’t change the max-height of the info window? According to https://wpstorelocator.co/document/wpsl_infobox_settings/ there’s no parameter for that setting…?
Hi again,
Actually the info window comes in two flavours. Check this option in the settings (screenshot).
If you enable the setting “Use the default style for the info window?”, then it will not be resizable. But if you disable it, the resulting info window is a bit uglier at first, but more customizable. You need to theck the resulting HTML markup to see the differences.
Without that option checked, you can modify the height with CSS rules like for example:
.wpsl-infobox {
max-height: 100px;
overflow: scroll;
}Which results in: screenshot.
Regards,
Ah, thanks again @farroyob Customising it with CSS shouldn’t be a problem at all.
