I'm trying do get a java mesage after login in wordpress. Here is my code:
function myFunction()
{
?>
<script>
alert('test');
</script>
<?php
}
add_action( 'wp_login', 'myFunction' );
I had a sidebar login widget. If i replace wp_login with get_header it works. Why does the wp_login not working ?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.