• Resolved mddsharp

    (@mddsharp)


    I have the following in my theme functions.php file:

    function wpse113069_email_me_every_visit() {
        wp_mail( '[email protected]', 'You had a visitor...', 'Yea, someone was on your site!' );
    }
    
    add_action( 'wp', 'wpse113069_email_me_every_visit' );
    

    This simply emails [email protected] anytime someone visits my site with the subject “You had a visitor…” and email body “Yea, someone was on your site!”.

    What would I add to this such that the post URLs are included in the email?

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Need help with a simple script’ is closed to new replies.