You could try this inside your themes functions.php:
its a function by dagon design
function dddn_process($id) {
global $wpdb;
$tp = $wpdb->prefix;
$result = $wpdb->get_row("
SELECT post_status, post_title, user_login, user_nicename, display_name
FROM {$tp}posts, {$tp}users
WHERE {$tp}posts.post_author = {$tp}users.ID
AND {$tp}posts.ID = '$id'
");
if ($result->post_status == "publish") {
$message = "";
$message .= "A new post was submitted on '" . get_bloginfo('name') . "'\n\n";
$message .= "Title: " . $result->post_title . "\n\n";
$message .= "Author: " . $result->display_name . "\n\n";
$message .= "Link: " . get_permalink($id);
$subject = "Post Submitted on '" . get_bloginfo('name') . "'";
$recipient = get_bloginfo('admin_email');
mail($recipient, $subject, $message);
}
}
add_action('publish_post', 'dddn_process');
Related Posts:
- How to display by default only published posts/pages in the admin area?
- Any way to create a revision of a post ONLY with a new button in the Meta Box?
- Allow role to delete posts but block him the wp-admin
- WP Admin register taxonomy and post type performance
- Admin – create custom post status and display above table
- How to add convenient buttons for new custom post statuses
- Put page on Archived statut after end of publication date
- Creating widget – ask for selecting a post in the admin panel
- issue in wordpress auto delete post and redirect to another 1
- Choose options via url
- Get post ID in post/page edit area
- How to include my own css in post
- Custom post types related to same custom post type?
- How do I insert a post with custom post type and relate it to a custom taxonomy?
- Dynamically switch template on click
- “about us”, ” contact” sections should be article(post) or page in the simple small Business website?
- Send a review notification email to admin when a post is 12 months old
- Is it possible to customize the post according to post format in single.php?
- Customize rel=canonical tag for single blog post
- a little direction on custom post type
- disable Tab post on nav-menus page (Admin)
- Format latest/newest post differently
- Custom taxonomy archive page problem
- Tell WP to use a specific template file in posts
- How to remove specific tag from multiple posts?
- Is there a way to create a meta box that can be added multiple times to a post dynamically?
- How to detect when admin user is on the All Posts page?
- relating business and products with custom taxonomy?
- Best Way to Add UnEditable HTML to Posts
- How safe is it to delete old posts edits to save database space?
- Two Custom Post Types with Identical Articles Competing for the same Slug
- Custom Post Type archive
- WordPress custom post type with folder structure in slug
- Using setup_postdata() with multi-dimensional array
- Is codex right on deleting post?
- Check if a custom post type has already been created
- All posts display default index.html
- How can I add a box to edit Order on a regular post?
- WordPress Query Posts From Category Post on Static Page
- Edit multiple custom post types while saving a new or edited post
- Filtering posts on Post Administration Page by Week Number instead of by Month
- How to add the time of a post to the list of posts on the administration page?
- Is there a way to add the list of recent posts into the admin sub menu on hover?
- Create a custom posts page
- How to add automatically bootstrap 4 order-lg-1 and order-lg-2 classes for columns in foreach loop based on the count?
- if in category but only with post meta
- How to get different Related Posts
- How to allow multiple thumbnail upload for Posts?
- add external project to web site wordpress on production
- Deleted a user with administrator rights. Now all the data/content/images are lost. how to recover them back
- Show custom post with custom categories with specific slug
- register_post_type permalink
- Display the 2nd category name of a custom post type without error if its null?
- Auto delete posts based on content text
- How to call posts under a specific category on static front page?
- Querying another post category to match current post and display in loop
- Custom home page with full post for first one only
- Custom Post Limit for homepage only without plugin?
- Display value of custom field at the beginning of a post
- l accidentally permanently deleted a Draft. There’s any way I can recover it?
- datepicker value in mysql
- Inserting an example of the last 3 post on to the homepage
- I don’t want the complete article to show on homepage
- Post Status Frontend Announcement
- Static pages not working
- Optimize CPT-function with a loop
- Add post tags to previously created custom post type
- Can WordPress handle following functionalities?
- Simple Custom Metabox Not Saving
- Get a term each custom post type
- Change default post style to columns
- Post titles and thumbnails as links to custom post types?
- Custom Post Type, post-formats associated to custom post type > 404 archives
- How to display only one category in a custom post type?
- Adding a custom post type meta field to rss
- How to restore deleted post related with deleted users
- After 3.5.1. upgrade, posts appearing on Site yet *NOT* in WP admin!
- Help with listing current users submitted custom post type in template file
- Delete post from admin but not from database
- Send email to admin with post author
- Custom Post Type Single Loop Outputting Wrong Post
- add_rewrite_rule and template redirect not working
- Getting post and attached image from subdomain
- Custom post type slideshow background images to insert in a plugin
- Organization of time insensitive content
- Custom Select Query – Selecting the Year?
- Deleting old posts
- How To Use Custom Tax of a Post Type
- How to output all taxonomy links from a custom post type in a menu?
- In admin panel, use a form to create a post?
- Can I style single post that are in multiple catergories?
- Trying to exclude custom posts based on date, while sorting by custom field
- WordPress Post Deletion Issue
- How Can I Always Display A Particular Post First Using WP_Query?
- What would causes search to return incorrect results?
- Help on conditional statement to accompany wp_insert_post function please?
- Changing permalink of WordPress
- MySQL: Possible to replace all of wp_posts.post_content(id#) via UPDATE + REPLACE + SELECT?
- Hook save_post_cpt not triggered when custom fields are modified
- Change modified date to current date when title updated automatically