问题描述
我有一个新用户弹出窗口,但我不知道该怎么称呼它。我应该使用哪个钩子来显示弹出窗口?
<script>
jQuery(document).ready(function(){
jQuery( window ).load(function() {
jQuery('.newsletterpopup').show();
jQuery('.popupshadow').show();
});
});
</script>
此代码显示欢迎弹出窗口
解决方法
您只需在WordPress中使用 user_register 钩子,然后在回调函数中显示您的欢迎弹出窗口
add_action( 'user_register','myfunction',10,1 );
function myfunction( $user_id ) {
// Your code here
}