Cron job to call php to email last 24 hours posts

In your functions.php you can use this. You will have to activate your theme again for it to take effect. You only want to schedule a cron job on activation, not on activation NOT on every page load, which is what the functions.php does, it loads on every page load. This would be betterused in … Read more

Custom notification for contributors when posts are scheduled

Instead of rely on global $post, you should use the post object passed to function via the posts status transition: add_action(‘pending_to_future’, ‘scheduledNotification’); add_action(‘approved_to_future’, ‘scheduledNotification’); function scheduledNotification( $post ) { $author = get_userdata($post->post_author); // the rest of your function here }

WordPress Form To Email.php and Theme

You need to include the wordpress config file: require $_SERVER[‘DOCUMENT_ROOT’].’/wp-config.php’; OR use a page template if your form handler is in your theme. Take a look at using page template’s in wordpress: http://codex.wordpress.org/Page_Templates

Comment notification not working

I do not see the $comment_ID variable having any value in your code. So try by changing the following code wp_notify_postauthor($comment_ID, $comment->comment_type); to wp_notify_postauthor($comment->comment_ID, $comment->comment_type); You can also remove $comment->comment_type as per codex

Email notification

$ticket is a WP_Post object. It should have all of the information you need. Just add that information to the $message string to create whatever content you want. Bare-bones example: $message=”You are viewing “.$ticket->post_title; $message .= ‘Post Content: ‘.$ticket->post_content; $message .= ‘View it: ‘ . get_permalink( $ticket->ID ) . “\nEdit it: ” . get_edit_post_link( $ticket->ID … Read more