Skip to content

Instantly share code, notes, and snippets.

@mustafauysal
Created January 5, 2024 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mustafauysal/013384bbd848e8105efbce7dc617d016 to your computer and use it in GitHub Desktop.
Save mustafauysal/013384bbd848e8105efbce7dc617d016 to your computer and use it in GitHub Desktop.
example snippet to change magic login default message dynamically with JS
<?php
add_action( 'wp_footer', function () {
?>
<script>
document.addEventListener('DOMContentLoaded', function () {
var messageElement = document.querySelector('.magic-login-form-header .message');
if (messageElement) {
messageElement.innerText = 'Your new message here';
}
});
</script>
<?php } );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment