Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I setup a custom post type and everything works right. The user can submit for review and I see it's pending in the admin area. How can I have WordPress send me an Email Notification whenever a user submits a post?

add_action( 'init', 'artwork_feature');
function artwork_feature() {
register_post_type( 'artwork',
    array(
        'labels' => array(
            'name' => __( 'Artwork' ),
            'singular_name' => __( 'Artwork' )
        ),
    'public' => true,
    'exclude_from_search'       => false,
    'capability_type' => 'artwork',
    'supports' => array('custom-fields', 'comments'),
        'capabilities' => array(
            'publish_posts' => 'publish_artworks',
            'edit_posts' => 'edit_artworks',
            'edit_others_posts' => 'edit_others_artwork',
            'delete_posts' => 'delete_artworks',
            'delete_others_posts' => 'delete_others_artwork',
            'read_private_posts' => 'read_private_artwork',
            'edit_post' => 'edit_artwork',
            'delete_post' => 'delete_artwork',
            'read_post' => 'read_artwork',
        ),
    'map_meta_cap' => true,
    'has_archive' => true,
    'supports' => array('title', 'editor', 'thumbnail')

    )
);
}
share|improve this question
2  
Is this something you've custom built? It is a plugin? By comments do you mean like Post Comments you would make on a blog? When you create a Post Type you should be able to set the option 'supports' => array('comments') View Codex –  Howdy_McGee Mar 25 at 20:52
    
I set it up in functions.php and I do have it set to supports => comments but I don't get any notifications. Yes I am talking about post comments which does work as expected. I added my code. –  Brian Mar 25 at 21:32
    
Is this not possible? –  Brian Mar 27 at 13:33
    
I've tested this with my Post Type and I get the Red (1) whenever somebody posts a comment. If you want email notifications, checkout Settings->Discussion –  Howdy_McGee Mar 27 at 13:50
1  
I was able to find what I wanted with: Post Status Notifier Lite –  Brian Mar 27 at 17:30
show 5 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.