# Send Gravity Forms Notifications to the Page Author

> Sends the admin notification of a Gravity Forms form to the author of the post or page the form was submitted from, ideal for agent, listing or staff profile pages.

- Type: PHP
- Runs: Run everywhere
- Category: [Forms](https://wpide.com/library/category/forms/)
- Tags: gravity-forms, notifications, authors
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/gf-notify-page-author/

## Code

```php
$wpide_gf_author_notifications = array( 'Admin Notification' ); // Notification names to reroute.

add_filter( 'gform_notification', function ( $notification, $form, $entry ) use ( $wpide_gf_author_notifications ) {
    if ( ! in_array( rgar( $notification, 'name' ), $wpide_gf_author_notifications, true ) ) {
        return $notification;
    }

    $post_id = url_to_postid( (string) rgar( $entry, 'source_url' ) );
    $post    = $post_id ? get_post( $post_id ) : null;
    $author  = $post ? get_userdata( (int) $post->post_author ) : false;

    if ( $author && is_email( $author->user_email ) ) {
        $notification['toType'] = 'email';
        $notification['to']     = $author->user_email;
    }

    return $notification;
}, 10, 3 );
```

## Notes

Only notifications named in the list at the top are changed; the original recipient is used when the author has no email.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Send Gravity Forms Notifications to the Page Author" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
