Publish and go to page

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?

Topic wp-link-pages publish Wordpress

Category Web


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;
});

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.