introducing single brochures
This commit is contained in:
parent
030286a720
commit
3d2fe8ef3b
14
single-brochures.php
Normal file
14
single-brochures.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