Files
car-t-t/archive-service.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

50 lines
1.8 KiB
PHP

<?php
/**
* Service archive template.
*
* @package Fragrance_Trade
*/
get_header();
?>
<main id="primary" class="site-main">
<div 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' => null ),
),
)
);
?>
<header class="page-header pb-5">
<h1><?php esc_html_e( '服务项目', 'fragrance-trade' ); ?></h1>
<p><?php esc_html_e( '我们为各类车型提供专业贴膜施工服务,按需定制。', 'fragrance-trade' ); ?></p>
</header>
<div class="pb-5">
<div class="capability-grid">
<?php while ( have_posts() ) : the_post(); ?>
<?php
$image = get_post_meta( get_the_ID(), '_service_image', true );
$img = $image ? $image : fragrance_trade_asset_uri( 'products/placeholder-01.svg' );
?>
<article class="capability-card">
<div class="capability-image"><a href="<?php the_permalink(); ?>"><img src="<?php echo esc_url( $img ); ?>" alt="<?php the_title_attribute(); ?>" class="img-fluid" loading="lazy"></a></div>
<div class="capability-body">
<p class="capability-label"><?php esc_html_e( '贴膜服务', 'fragrance-trade' ); ?></p>
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<p><?php echo esc_html( get_the_excerpt() ); ?></p>
<a href="<?php echo esc_url( home_url( '/contact/?service=' . rawurlencode( get_the_title() ) ) ); ?>" class="btn btn-b2b-outline"><?php esc_html_e( '预约', 'fragrance-trade' ); ?></a>
</div>
</article>
<?php endwhile; ?>
</div>
<?php the_posts_pagination(); ?>
</div>
</div>
</main>
<?php get_footer(); ?>