redirection webinaire single to video url
This commit is contained in:
parent
2ac79ca14c
commit
95486afc27
14
single-videos-webinaires.php
Normal file
14
single-videos-webinaires.php
Normal 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();
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user