introducing single-finches-infos
This commit is contained in:
parent
3d2fe8ef3b
commit
9540d1f8db
14
single-fiches-infos.php
Normal file
14
single-fiches-infos.php
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?php
|
||||||
|
$brochureFile = get_field('brochure_pdf');
|
||||||
|
|
||||||
|
if ($brochureFile && $brochureFile['url']) {
|
||||||
|
wp_redirect($brochureFile['url']);
|
||||||
|
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