add_action('wp_footer', 'my_captcha_overlay', 999); function my_captcha_overlay() { if (is_admin()) return; if (is_user_logged_in()) return; ?>