Files
AsterionWP2026/wp-content/themes/asterion-bricks/templates/page-industry-detail.php
j.foucher eb4a13ec0f feat(industries): build 5-page Industries section
Implements the Industries hub + 4 detail pages (Police, Special Forces,
Military, Firefighters) following the same data + partial + custom
template pattern as Solutions.

- inc/industries-data.php: 4 industries keyed by slug, copy verbatim
  from PDF Strategie & Contenu D.7-D.10.
- template-parts/industry-detail.php: hero + section iterator + shared
  conversion banner. Hero differs from Solution's: eyebrow + tagline-as-H1
  (no trademark concat), no upsell block.
- templates/page-industry-detail.php: Custom Template assigned to the
  4 child pages, looks up slug in industries-data.
- templates/page-industries-overview.php: Hub /industries/ with 4 cards.

5 pages seeded by one-shot mu-plugin (asterion-seed-industries.php in
LocalWP) and verified HTTP 200:
  /industries/                  55 KB
  /industries/police/           63 KB
  /industries/special-forces/   62 KB
  /industries/military/         60 KB
  /industries/firefighters/     60 KB

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 12:27:25 +02:00

32 lines
966 B
PHP

<?php
/**
* Template Name: Industry Detail
*
* Custom page template for /industries/police/, /industries/special-forces/,
* /industries/military/, /industries/firefighters/.
*
* Looks up the page slug in inc/industries-data.php and hands the matched
* tier off to template-parts/industry-detail.php.
*
* @package AsterionBricks
*/
defined('ABSPATH') || exit;
$slug = get_post_field('post_name', get_queried_object_id());
$data = include AV_THEME_DIR . '/inc/industries-data.php';
if (! isset($data[$slug])) {
get_header();
echo '<section class="av-section"><div class="av-container">';
echo '<h1>' . esc_html(get_the_title()) . '</h1>';
echo '<p>' . esc_html__('Industry data not found for slug:', 'asterion-bricks') . ' ' . esc_html($slug) . '</p>';
echo '</div></section>';
get_footer();
return;
}
get_header();
set_query_var('av_industry', $data[$slug]);
get_template_part('template-parts/industry-detail');
get_footer();