WordPress 4.3.1、Woocommerce 2.4.7、テーマ ストアフロント 1.5.1 を使用しています。
カート内のアイテムの量に沿ってカートの現在の価格を表示するヘッダーの「site-header-cart」を、アイテムの数のみを表示するように変更したい:
<span class="amount">463,33 €</span>
<span class="count">7 items</span>
次のようにする必要があります。
<span class="count">7</span>
template-tags.php に変更を加えるたびに、
<a class="cart-contents" ...>
...
</a>
表示されています。href 内の何かを変更しようとすると、変更されていない元のものが表示されます。
if ( ! function_exists( 'storefront_cart_link' ) ) {
function storefront_cart_link() {
?>
<a class="cart-contents" href="<?php echo esc_url( WC()->cart->get_cart_url() ); ?>" title="<?php _e( 'View your shopping cart', 'storefront' ); ?>">
<span class="count"><?php echo wp_kses_data( sprintf( _n( '%d item', '%d items', WC()->cart->get_cart_contents_count(), 'storefront' ), WC()->cart->get_cart_contents_count() ) );?></span>
</a>
<?php
}
}
何が起こっているのですか、誰か助けてくれますか?