Files
car-t-t/single-case.php
T
zhs123 43272d25eb refactor: 死代码清理 + CDN SRI 加固 + 面包屑组件 + 代码规范文档
- 删除 7 个死模板文件 (products/services/quality/process/projects/customization/rfq)
- 删除 13 个旧图片素材 (jpg/png/webp)
- 新增 CDN SRI 完整性校验 (Bootstrap CSS/JS)
- 新增面包屑导航模板组件
- 新增代码清理方案与代码审查标准文档
- 更新 README.md
2026-07-24 17:48:00 +08:00

43 lines
1.3 KiB
PHP

<?php
/**
* Single case template.
*
* @package Fragrance_Trade
*/
get_header();
?>
<main id="primary" class="site-main">
<?php while ( have_posts() ) : the_post(); ?>
<article class="page-content container">
<?php
get_template_part(
'template-parts/breadcrumb',
null,
array(
'items' => array(
array( 'label' => __( '首页', 'fragrance-trade' ), 'url' => home_url( '/' ) ),
array( 'label' => __( '案例作品', 'fragrance-trade' ), 'url' => home_url( '/cases/' ) ),
array( 'label' => get_the_title(), 'url' => null ),
),
)
);
?>
<?php if ( has_post_thumbnail() ) : ?>
<div class="mb-4"><?php the_post_thumbnail( 'large', array( 'class' => 'img-fluid rounded' ) ); ?></div>
<?php endif; ?>
<header class="mb-4">
<h1><?php the_title(); ?></h1>
<?php
$types = get_the_terms( get_the_ID(), 'case_type' );
if ( $types && ! is_wp_error( $types ) ) :
?>
<p class="case-types"><?php echo esc_html( implode( ', ', wp_list_pluck( $types, 'name' ) ) ); ?></p>
<?php endif; ?>
</header>
<div class="case-content"><?php the_content(); ?></div>
<a href="<?php echo esc_url( home_url( '/contact/' ) ); ?>" class="btn btn-b2b-primary mt-3"><?php esc_html_e( '预约同款施工', 'fragrance-trade' ); ?></a>
</article>
<?php endwhile; ?>
</main>
<?php get_footer(); ?>