feat: release B2B Trade theme 2.1.0

This commit is contained in:
WorkBuddy
2026-07-24 22:25:29 +08:00
parent 13a35c7ec7
commit 4f070d4677
64 changed files with 1769 additions and 1762 deletions
+10 -3
View File
@@ -4,13 +4,16 @@
*
* @package Fragrance_Trade
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
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
@@ -28,12 +31,16 @@ get_header();
?>
<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">
<?php if ( has_post_thumbnail() ) : ?>
<?php the_post_thumbnail( 'large', array( 'class' => 'img-fluid rounded', '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 rounded" decoding="async">
<?php endif; ?>
</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>
<a href="<?php echo esc_url( home_url( '/contact/' ) ); ?>" class="btn btn-b2b-primary mt-3"><?php esc_html_e( '联系门店', 'fragrance-trade' ); ?></a>
</div>
</div>
</article>