How to do a task only once for logged in users
There are various ways to do this, but I’ve recently addressed a similar problem by using cookies. add_action( ‘init’, ‘wpse_93797_cookie’ ); function wpse_93797_cookie() { if ( !isset ( $_COOKIE[‘wpse_93797_cookie_name’] ) ) { // Do your stuff. // Set your cookie so we don’t do stuff the next time around. // Note that 0 makes the … Read more