Files
car-t-t/single-case.php
T
zhs123 8a2890f8b4 refactor: 多页面门店重构 — CPT + 页面模板 + README 更新
- CPT: service(服务项目) + case(案例作品集) + case_type 分类
- 页面: 关于门店/常见问题/预约联系 + archive/single 模板
- 首页精简为 hero+trust+service-teaser+case-teaser+cta
- 主题激活自动迁移 Customizer 产品数据为 service 文章
- 预约表单: nonce+honeypot+rate-limit, URL 参数预填服务
- 联系页: 门店地址/电话/营业时间/百度地图导航
- Customizer 面板改为门店语境(13 板块)
- header CTA 改为预约, helpers 更新为门店口径
- README.md 全面更新为门店多页面架构文档
2026-07-24 15:37:40 +08:00

35 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">
<nav class="breadcrumb-nav mb-4" aria-label="<?php esc_attr_e( '面包屑', 'fragrance-trade' ); ?>">
<a href="<?php echo esc_url( home_url( '/cases/' ) ); ?>"><?php esc_html_e( '案例作品', 'fragrance-trade' ); ?></a>
<span aria-hidden="true"> / </span>
<span><?php the_title(); ?></span>
</nav>
<?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(); ?>