redirection webinaire single to video url

This commit is contained in:
Antoine M 2024-07-17 11:51:16 +02:00
parent 2ac79ca14c
commit 95486afc27

View File

@ -0,0 +1,14 @@
<?php
$videoUrl = get_field('url');
write_log($videoUrl);
if ($videoUrl) {
wp_redirect($videoUrl);
exit();
} else {
// Si l'URL de la brochure est vide, redirige vers la page 404
global $wp_query;
$wp_query->set_404();
status_header(404);
get_template_part(404);
exit();
}