Custom Fields
Re-Envisioned
Support MB Frontend Submission redirect only on submit - not an update

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #32036
    Long Nguyen
    Moderator

    Hi,

    You can check the post ID in the URL if the users edit the post from the frontend dashboard. Here is the example code

    add_filter( 'rwmb_frontend_redirect', function( $redirect, $config ) {
        // Get the post ID from the URL if the user edit the post from frontend dashboard
        $value = $_GET['rwmb_frontend_field_post_id'];
        if ( empty( $value ) ) {
            $redirect = 'https://yourdomain.com/custom-page/';
        }
        return $redirect;
    }, 10, 2 );
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.