Checked By Default
-
Hi,
The option to be “checked by default” the checkboxes under comments is not working on the frontend. I am using Bootscore theme.
Any idea how to fix it?For now, I am forcing like this:
function force_checkbox_checked()
{
?>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function () {
var checkbox = document.getElementById('comment_subscribe');
if (checkbox) {
checkbox.checked = true;
}
});
</script>
<?php
}
add_action('wp_footer', 'force_checkbox_checked');
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.