function redirect_specific_page() {
// Check if the current page is the one you want to redirect and user is logged in
if ( is_page( 'page-slug' ) && is_user_logged_in() ) {
// Redirect to the desired URL
wp_redirect( 'https://example.com/new-page/' );
exit;
}
}
add_action( 'template_redirect', 'redirect_specific_page' );
Instead of slug, we can use page id there.
To pass elementor
if ( is_page( 123 ) && is_user_logged_in() && ! is_admin() && ! is_customize_preview() && ! ( is_plugin_active( 'elementor/elementor.php' ) && \Elementor\Plugin::$instance->editor->is_edit_mode() ) )
OR
if ( is_page( '13446' ) && is_user_logged_in() && !is_customize_preview() && !\Elementor\Plugin::$instance->editor->is_edit_mode() && !\Elementor\Plugin::$instance->preview->is_preview_mode() )