Can I add a link to "Publish"-button so when it's clicked it publishes new post and direct to another page in same click?
1 Answer
You can using redirect_post_location
action in the functions.php in your theme.
For example:
add_action('redirect_post_location', function () {
global $post;
return 'http://google.com/search?q=' . $post->ID;
});
-
Thanks. I just saw the answer and duplicate so it's fine now. Thanks for helping out :).– GRRCommented Mar 14, 2017 at 12:51