- 删除 7 个死模板文件 (products/services/quality/process/projects/customization/rfq) - 删除 13 个旧图片素材 (jpg/png/webp) - 新增 CDN SRI 完整性校验 (Bootstrap CSS/JS) - 新增面包屑导航模板组件 - 新增代码清理方案与代码审查标准文档 - 更新 README.md
43 lines
1.4 KiB
PHP
43 lines
1.4 KiB
PHP
<?php
|
|
/**
|
|
* Single service template.
|
|
*
|
|
* @package Fragrance_Trade
|
|
*/
|
|
get_header();
|
|
?>
|
|
<main id="primary" class="site-main">
|
|
<?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="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( '/services/' ) ),
|
|
array( 'label' => get_the_title(), 'url' => null ),
|
|
),
|
|
)
|
|
);
|
|
?>
|
|
<div class="row g-5 align-items-center">
|
|
<div class="col-lg-6">
|
|
<img src="<?php echo esc_url( $img ); ?>" alt="<?php the_title_attribute(); ?>" class="img-fluid rounded">
|
|
</div>
|
|
<div class="col-lg-6">
|
|
<h1><?php the_title(); ?></h1>
|
|
<div class="service-content"><?php the_content(); ?></div>
|
|
<a href="<?php echo esc_url( home_url( '/contact/?service=' . rawurlencode( get_the_title() ) ) ); ?>" class="btn btn-b2b-primary mt-3"><?php esc_html_e( '预约这项服务', 'fragrance-trade' ); ?></a>
|
|
</div>
|
|
</div>
|
|
</article>
|
|
<?php endwhile; ?>
|
|
</main>
|
|
<?php get_footer(); ?>
|