How can we make it so that people can only select one Day and Time at a time, on the filters? We don’t want them to select multiples on the filter check boxes.
Hey amyncuih,
Thank you for the inquiry.
You may need to contact the plugin developer regarding this, as these options are added by the plugin, not by the theme. You can try adding this script to the functions.php file, but we cannot guarantee that it will work.
function ava_custom_script_here()
{
?>
<script>
(function ($)
{
document.addEventListener('DOMContentLoaded', function ()
{
const checkboxes = document.querySelectorAll('.tribe-common-form-control-checkbox__input[name="tribe_dayofweek[]"]');
checkboxes.forEach(function (checkbox)
{
checkbox.addEventListener('change', function ()
{
if (this.checked)
{
checkboxes.forEach(function (otherCheckbox)
{
if (otherCheckbox !== checkbox)
{
otherCheckbox.checked = false;
}
});
}
});
});
});
})(jQuery);
</script>
<?php
}
add_action('wp_footer', 'ava_custom_script_here');
Best regards,
Ismael