53 lines
2.0 KiB
PHP
53 lines
2.0 KiB
PHP
<?php
|
|
/**
|
|
* Service archive template.
|
|
*
|
|
* @package Fragrance_Trade
|
|
*/
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit;
|
|
}
|
|
|
|
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 );
|
|
?>
|
|
<article class="capability-card">
|
|
<div class="capability-image"><a href="<?php the_permalink(); ?>"><?php if ( has_post_thumbnail() ) : ?><?php the_post_thumbnail( 'fragrance-capability', array( 'class' => 'img-fluid', 'loading' => 'lazy', 'decoding' => 'async' ) ); ?><?php else : ?><img src="<?php echo esc_url( $image ? $image : fragrance_trade_asset_uri( 'images/products/placeholder-01.svg' ) ); ?>" alt="<?php the_title_attribute(); ?>" class="img-fluid" loading="lazy" decoding="async"><?php endif; ?></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/' ) ); ?>" 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(); ?>
|