Just drop this in functions.php
add_action('publish_page', 'wpcanyon_redirect_on_page_publish');
function wpcanyon_redirect_on_page_publish($post_ID) {
header('Location: '.get_home_url().'/wp-admin/edit.php?post_type=page');
exit();
}
add_action('publish_post', 'wpcanyon_redirect_on_post_publish');
function wpcanyon_redirect_on_post_publish($post_ID) {
header('Location: '.get_home_url().'/wp-admin/edit.php?post_type=post');
exit();
}
That’s all, hope you find it useful.
Our WordPress themes
We have a few WordPress themes that we would like you to take a look at if you want.
check out the portfolio











Great script,but i’m got some problem if i use ‘quick edit’.
Any idea? Thank
This is a great little snippet. I’m quite annoyed that WordPress a) keeps you on the edit page by default and b) doesn’t provide an option to change this.
I’ll definitely be employing this on my sites though. Nice little time saver.