CAREERS

// Shortcode: [nxdental_careers_form]
add_shortcode(‘nxdental_careers_form’, function () {

// Handle submission
if ($_SERVER[‘REQUEST_METHOD’] === ‘POST’ && isset($_POST[‘nxdental_careers_nonce’])) {
if (!wp_verify_nonce($_POST[‘nxdental_careers_nonce’], ‘nxdental_careers_submit’)) {
return ‘

Security check failed. Please refresh and try again.

‘;
}

$name = sanitize_text_field($_POST[‘name’] ?? ”);
$email = sanitize_email($_POST[’email’] ?? ”);
$phone = sanitize_text_field($_POST[‘phone’] ?? ”);
$position = sanitize_text_field($_POST[‘position’] ?? ”);
$message = sanitize_textarea_field($_POST[‘message’] ?? ”);

$to = ‘info@nxdental.com’;
$subject = “New Career Application — {$position} — {$name}”;
$body =
“New Careers Application\n\n” .
“Name: {$name}\n” .
“Email: {$email}\n” .
“Phone: {$phone}\n” .
“Position: {$position}\n\n” .
“Message:\n{$message}\n\n” .
“Submitted from: ” . home_url() . “\n”;

$headers = [
‘Content-Type: text/plain; charset=UTF-8’,
‘Reply-To: ‘ . $name . ‘ ‘,
];

$sent = wp_mail($to, $subject, $body, $headers);

if ($sent) {
return ‘

Thank you — your application has been received.

‘;
} else {
return ‘

Sorry — we could not send your application right now. Please email info@nxdental.com.

‘;
}
}

// Render form
ob_start();
?>

Careers — Apply Now

Select a position and submit your application. We’ll respond promptly.






If you prefer, email your resume to info@nxdental.com.

return ob_get_clean();
});

Scroll to Top