• Resolved dolf h

    (@dolf-h)


    [ Moderator note: moved to How-to and Troubleshooting. ]

    I wonder if someone is familiar with a solution for the following:

    I do a lot of similar actions in admin-screen and it would be very time-saving when it would be possible to automatize some actions like:

    – after editing profile from a subscriber to be redirected to an admin-url of my choice and avoid the boring “profile is saved” message and also another click in the menu to activate the following action (in my case a user-list from AMR-users).

    I am looking for a plugin or code-snippet that makes that kind of macro’s or redirects possible and spend some hours to search. Without results.

    Would be nice if someone has a clue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • If you want to get your hands dirty you could look at actions in your functions.php file e.g.

    function myfunction($post_id) {
    
        $posttype = get_post_type($post_id);
        if($posttype == 'whatever'){
        //do stuff
        }
    }
    
    add_action( 'save_post', 'myfunction' );
    Thread Starter dolf h

    (@dolf-h)

    Thank you Latro666. I have this code working now:

    function custom_profile_redirect() {

    if (current_user_can(‘level_10’)) {
    wp_redirect( ‘/wp-admin/userslist/’ );
    exit;
    }
    }

    add_action(‘profile_update’, ‘custom_profile_redirect’, 12 );

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Redirect admin actions to admin-url of my choice’ is closed to new replies.