Is there any way I can redirect the reading of the original file to the one I created inside the plugin?
Thank you in advance.
Is there any way I can redirect the reading of the original file to the one I created inside the plugin?
Thank you in advance.
A "simple" way to do this is by redirecting the login to a custom page, and there you make the modifications you need.
Search in codex wp_login_form()
.
This article can also give you a light
Another solution would be to use your child's functions.php to insert these elements dynamically. Example:
function my_custom_login() {
echo '<script>
document.addEventListener("DOMContentLoaded", function(event) {
// Your code to run since DOM is loaded and ready
document.getElementById(\'loginform\').insertAdjacentHTML(\'beforebegin\',
\'<span class="asterisk">*</span>\');
});
</script>';
}
add_action('login_head', 'my_custom_login');