Notification to Admin or Author upon new post [duplicate]

You need to write your hook for transition_post_status action: function authorNotification( $new_status, $old_status, $post ) { if ( $new_status == ‘publish’ && $old_status != ‘publish’ ) { $author = get_userdata($post->post_author); $message = ” Hi “.$author->display_name.”, New post, “.$post->post_title.” has just been published at “.get_permalink( $post->ID ).”. “; wp_mail($author->user_email, “New Post Published”, $message); } } add_action(‘transition_post_status’, … Read more

Can I set a timer for pages to be published?

No script of function necessary. It’s actually built into WordPress. Simply go to your page to edit and on the right hand side you should see a widget labeled Publish. On the third line down, you will see an Edit button and you can set the date and time on when you want the page … Read more

How can I automatically set a post slug based on the post title during post publish?

As long as haven’t touched the slug WordPress will generate a new one after you entered a title. Update To change other peoples slugs use a filter (not tested!): add_filter( ‘wp_insert_post_data’, ‘prevent_numeric_slugs’, 10, 1 ); function prevent_numeric_slugs( $post_data ) { if ( ! isset ( $post_data[‘post_title’] ) or ! is_numeric( $post_data[‘post_name’] ) ) { // … Read more

How to add a SAVE button to replace PUBLISH on a custom post type?

Not mine but modified from here. But if you pop this into functions.php or a plugin it will work. add_filter( ‘gettext’, ‘change_publish_button’, 10, 2 ); function change_publish_button( $translation, $text ) { if ( ‘yourcustomposttype’ == get_post_type()) if ( $text == ‘Publish’ ) return ‘Save’; return $translation; }

Every possible way to get data (posts) from WordPress

Since you aren’t able to use the out-of-the-box functionality (i.e. not publishing the posts!) you will inevitably have to cover yourself in a few different ways. You seem to have most of them covered – but a couple more ideas: The single post page itself. Assuming you are OK with the post never being visible … Read more