How to remove the items word in cart woocommerce?
up vote
0
down vote
favorite
How to remove the items word in cart woocommerce?
See screenshot: WooCommerce Mini Cart header.php
in fuctions.php
Cart Fragments:
if ( ! function_exists( 'agricola_woocommerce_cart_link_fragment' ) )
function agricola_woocommerce_cart_link_fragment( $fragments )
ob_start();
agricola_woocommerce_cart_link();
$fragments['a.cart-contents'] = ob_get_clean();
return $fragments;
add_filter( 'woocommerce_add_to_cart_fragments',
'agricola_woocommerce_cart_link_fragment' );
Cart Link
if ( ! function_exists( 'agricola_woocommerce_cart_link' ) )
function agricola_woocommerce_cart_link()
?>
<a class="cart-contents" href="<?php echo esc_url( wc_get_cart_url() ); ?>" title="<?php esc_attr_e( 'View your shopping cart', 'agricola' ); ?>">
<?php
$item_count_text = sprintf(
/* translators: number of items in the mini cart. */
_n( '%d item', '%d items', WC()->cart->get_cart_contents_count(), 'agricola' ),
WC()->cart->get_cart_contents_count()
);
?>
<span class="amount"><?php echo wp_kses_data( WC()->cart->get_cart_subtotal() ); ?></span> <span class="count"><?php echo esc_html( $item_count_text ); ?></span>
</a>
<?php
Display Header Cart.
if ( ! function_exists( 'agricola_woocommerce_header_cart' ) )
function agricola_woocommerce_header_cart()
if ( is_cart() )
$class = 'current-menu-item';
else
$class = '';
?>
<ul id="site-header-cart" class="site-header-cart">
<li class="<?php echo esc_attr( $class ); ?>">
<?php agricola_woocommerce_cart_link(); ?>
</li>
<li>
<?php
$instance = array(
'title' => '',
);
the_widget( 'WC_Widget_Cart', $instance );
?>
</li>
</ul>
<?php
I already remove <?php $item_count_text = sprintf( /* translators: number of items in the mini cart. */ _n( '%d item', '%d items', WC()->cart->get_cart_contents_count(), 'agricola' ), WC()->cart->get_cart_contents_count()); ?> but keep come back with title like '9 items' I want to hide it.
I only want basket icon with price cost.
wordpress function woocommerce
add a comment |
up vote
0
down vote
favorite
How to remove the items word in cart woocommerce?
See screenshot: WooCommerce Mini Cart header.php
in fuctions.php
Cart Fragments:
if ( ! function_exists( 'agricola_woocommerce_cart_link_fragment' ) )
function agricola_woocommerce_cart_link_fragment( $fragments )
ob_start();
agricola_woocommerce_cart_link();
$fragments['a.cart-contents'] = ob_get_clean();
return $fragments;
add_filter( 'woocommerce_add_to_cart_fragments',
'agricola_woocommerce_cart_link_fragment' );
Cart Link
if ( ! function_exists( 'agricola_woocommerce_cart_link' ) )
function agricola_woocommerce_cart_link()
?>
<a class="cart-contents" href="<?php echo esc_url( wc_get_cart_url() ); ?>" title="<?php esc_attr_e( 'View your shopping cart', 'agricola' ); ?>">
<?php
$item_count_text = sprintf(
/* translators: number of items in the mini cart. */
_n( '%d item', '%d items', WC()->cart->get_cart_contents_count(), 'agricola' ),
WC()->cart->get_cart_contents_count()
);
?>
<span class="amount"><?php echo wp_kses_data( WC()->cart->get_cart_subtotal() ); ?></span> <span class="count"><?php echo esc_html( $item_count_text ); ?></span>
</a>
<?php
Display Header Cart.
if ( ! function_exists( 'agricola_woocommerce_header_cart' ) )
function agricola_woocommerce_header_cart()
if ( is_cart() )
$class = 'current-menu-item';
else
$class = '';
?>
<ul id="site-header-cart" class="site-header-cart">
<li class="<?php echo esc_attr( $class ); ?>">
<?php agricola_woocommerce_cart_link(); ?>
</li>
<li>
<?php
$instance = array(
'title' => '',
);
the_widget( 'WC_Widget_Cart', $instance );
?>
</li>
</ul>
<?php
I already remove <?php $item_count_text = sprintf( /* translators: number of items in the mini cart. */ _n( '%d item', '%d items', WC()->cart->get_cart_contents_count(), 'agricola' ), WC()->cart->get_cart_contents_count()); ?> but keep come back with title like '9 items' I want to hide it.
I only want basket icon with price cost.
wordpress function woocommerce
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
How to remove the items word in cart woocommerce?
See screenshot: WooCommerce Mini Cart header.php
in fuctions.php
Cart Fragments:
if ( ! function_exists( 'agricola_woocommerce_cart_link_fragment' ) )
function agricola_woocommerce_cart_link_fragment( $fragments )
ob_start();
agricola_woocommerce_cart_link();
$fragments['a.cart-contents'] = ob_get_clean();
return $fragments;
add_filter( 'woocommerce_add_to_cart_fragments',
'agricola_woocommerce_cart_link_fragment' );
Cart Link
if ( ! function_exists( 'agricola_woocommerce_cart_link' ) )
function agricola_woocommerce_cart_link()
?>
<a class="cart-contents" href="<?php echo esc_url( wc_get_cart_url() ); ?>" title="<?php esc_attr_e( 'View your shopping cart', 'agricola' ); ?>">
<?php
$item_count_text = sprintf(
/* translators: number of items in the mini cart. */
_n( '%d item', '%d items', WC()->cart->get_cart_contents_count(), 'agricola' ),
WC()->cart->get_cart_contents_count()
);
?>
<span class="amount"><?php echo wp_kses_data( WC()->cart->get_cart_subtotal() ); ?></span> <span class="count"><?php echo esc_html( $item_count_text ); ?></span>
</a>
<?php
Display Header Cart.
if ( ! function_exists( 'agricola_woocommerce_header_cart' ) )
function agricola_woocommerce_header_cart()
if ( is_cart() )
$class = 'current-menu-item';
else
$class = '';
?>
<ul id="site-header-cart" class="site-header-cart">
<li class="<?php echo esc_attr( $class ); ?>">
<?php agricola_woocommerce_cart_link(); ?>
</li>
<li>
<?php
$instance = array(
'title' => '',
);
the_widget( 'WC_Widget_Cart', $instance );
?>
</li>
</ul>
<?php
I already remove <?php $item_count_text = sprintf( /* translators: number of items in the mini cart. */ _n( '%d item', '%d items', WC()->cart->get_cart_contents_count(), 'agricola' ), WC()->cart->get_cart_contents_count()); ?> but keep come back with title like '9 items' I want to hide it.
I only want basket icon with price cost.
wordpress function woocommerce
How to remove the items word in cart woocommerce?
See screenshot: WooCommerce Mini Cart header.php
in fuctions.php
Cart Fragments:
if ( ! function_exists( 'agricola_woocommerce_cart_link_fragment' ) )
function agricola_woocommerce_cart_link_fragment( $fragments )
ob_start();
agricola_woocommerce_cart_link();
$fragments['a.cart-contents'] = ob_get_clean();
return $fragments;
add_filter( 'woocommerce_add_to_cart_fragments',
'agricola_woocommerce_cart_link_fragment' );
Cart Link
if ( ! function_exists( 'agricola_woocommerce_cart_link' ) )
function agricola_woocommerce_cart_link()
?>
<a class="cart-contents" href="<?php echo esc_url( wc_get_cart_url() ); ?>" title="<?php esc_attr_e( 'View your shopping cart', 'agricola' ); ?>">
<?php
$item_count_text = sprintf(
/* translators: number of items in the mini cart. */
_n( '%d item', '%d items', WC()->cart->get_cart_contents_count(), 'agricola' ),
WC()->cart->get_cart_contents_count()
);
?>
<span class="amount"><?php echo wp_kses_data( WC()->cart->get_cart_subtotal() ); ?></span> <span class="count"><?php echo esc_html( $item_count_text ); ?></span>
</a>
<?php
Display Header Cart.
if ( ! function_exists( 'agricola_woocommerce_header_cart' ) )
function agricola_woocommerce_header_cart()
if ( is_cart() )
$class = 'current-menu-item';
else
$class = '';
?>
<ul id="site-header-cart" class="site-header-cart">
<li class="<?php echo esc_attr( $class ); ?>">
<?php agricola_woocommerce_cart_link(); ?>
</li>
<li>
<?php
$instance = array(
'title' => '',
);
the_widget( 'WC_Widget_Cart', $instance );
?>
</li>
</ul>
<?php
I already remove <?php $item_count_text = sprintf( /* translators: number of items in the mini cart. */ _n( '%d item', '%d items', WC()->cart->get_cart_contents_count(), 'agricola' ), WC()->cart->get_cart_contents_count()); ?> but keep come back with title like '9 items' I want to hide it.
I only want basket icon with price cost.
wordpress function woocommerce
wordpress function woocommerce
asked Sep 24 at 13:29
Bubble
36
36
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
You can use CSS to hide that particular part. If you can provide the website link, we can help you with the CSS.
OR you can use String Locator plugin to locate the code where it is written inside the files and then you can comment it or remove it from the file itself.
Thanks
thanks, the site in localhost not live yet, I addedspan.count display: none;however in the future I might have like Basket icon with number of items without the word of items how do I do that?
– Bubble
Sep 24 at 13:57
One way which I can think of is to make changes in the files itself. which I have already mentioned how to find that code. you can create a woocommerce folder in your theme and copy paste the file in which you have to make the change so you wont have to edit the plugin files.
– Anup Gupta
Sep 25 at 7:56
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
You can use CSS to hide that particular part. If you can provide the website link, we can help you with the CSS.
OR you can use String Locator plugin to locate the code where it is written inside the files and then you can comment it or remove it from the file itself.
Thanks
thanks, the site in localhost not live yet, I addedspan.count display: none;however in the future I might have like Basket icon with number of items without the word of items how do I do that?
– Bubble
Sep 24 at 13:57
One way which I can think of is to make changes in the files itself. which I have already mentioned how to find that code. you can create a woocommerce folder in your theme and copy paste the file in which you have to make the change so you wont have to edit the plugin files.
– Anup Gupta
Sep 25 at 7:56
add a comment |
up vote
0
down vote
You can use CSS to hide that particular part. If you can provide the website link, we can help you with the CSS.
OR you can use String Locator plugin to locate the code where it is written inside the files and then you can comment it or remove it from the file itself.
Thanks
thanks, the site in localhost not live yet, I addedspan.count display: none;however in the future I might have like Basket icon with number of items without the word of items how do I do that?
– Bubble
Sep 24 at 13:57
One way which I can think of is to make changes in the files itself. which I have already mentioned how to find that code. you can create a woocommerce folder in your theme and copy paste the file in which you have to make the change so you wont have to edit the plugin files.
– Anup Gupta
Sep 25 at 7:56
add a comment |
up vote
0
down vote
up vote
0
down vote
You can use CSS to hide that particular part. If you can provide the website link, we can help you with the CSS.
OR you can use String Locator plugin to locate the code where it is written inside the files and then you can comment it or remove it from the file itself.
Thanks
You can use CSS to hide that particular part. If you can provide the website link, we can help you with the CSS.
OR you can use String Locator plugin to locate the code where it is written inside the files and then you can comment it or remove it from the file itself.
Thanks
answered Sep 24 at 13:49
Anup Gupta
123
123
thanks, the site in localhost not live yet, I addedspan.count display: none;however in the future I might have like Basket icon with number of items without the word of items how do I do that?
– Bubble
Sep 24 at 13:57
One way which I can think of is to make changes in the files itself. which I have already mentioned how to find that code. you can create a woocommerce folder in your theme and copy paste the file in which you have to make the change so you wont have to edit the plugin files.
– Anup Gupta
Sep 25 at 7:56
add a comment |
thanks, the site in localhost not live yet, I addedspan.count display: none;however in the future I might have like Basket icon with number of items without the word of items how do I do that?
– Bubble
Sep 24 at 13:57
One way which I can think of is to make changes in the files itself. which I have already mentioned how to find that code. you can create a woocommerce folder in your theme and copy paste the file in which you have to make the change so you wont have to edit the plugin files.
– Anup Gupta
Sep 25 at 7:56
thanks, the site in localhost not live yet, I added
span.count display: none; however in the future I might have like Basket icon with number of items without the word of items how do I do that?– Bubble
Sep 24 at 13:57
thanks, the site in localhost not live yet, I added
span.count display: none; however in the future I might have like Basket icon with number of items without the word of items how do I do that?– Bubble
Sep 24 at 13:57
One way which I can think of is to make changes in the files itself. which I have already mentioned how to find that code. you can create a woocommerce folder in your theme and copy paste the file in which you have to make the change so you wont have to edit the plugin files.
– Anup Gupta
Sep 25 at 7:56
One way which I can think of is to make changes in the files itself. which I have already mentioned how to find that code. you can create a woocommerce folder in your theme and copy paste the file in which you have to make the change so you wont have to edit the plugin files.
– Anup Gupta
Sep 25 at 7:56
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52480546%2fhow-to-remove-the-items-word-in-cart-woocommerce%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password