Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1322752
    speedlist
    Participant

    Hi,

    How can I edit the text for the WooCommerce Item Count on the navigation bar/header?
    Here’s the site: http://hudsonrivermil.wpengine.com/
    I’m planning on removing the word “items” and just display the item count number.

    Thanks.

    #1322948
    Joao
    Moderator

    Hi There,

    Please add the following code to Apperence > Customizer > Custom > CSS

    .x-navbar .x-nav > li.x-menu-item-woocommerce > a .x-cart > span.outer {
        color: white;
    }
    

    Hope it helps

    Joao

    #1323986
    speedlist
    Participant

    Hi Joao,

    I checked the CSS code you sent but it just makes the font color into white. What I need is to remove the word “items” and just have the number of the item count.

    Thanks

    #1324046
    Thai
    Moderator

    Hi There,

    Please add the following code under functions.php file locates in your child theme:

    add_filter('ngettext', 'translate_text' );
    function translate_text($translated) { 
      $translated = str_ireplace('Items', '', $translated);
      $translated = str_ireplace('Item', '', $translated);
      return $translated; 
    }

    Hope it helps 🙂

    #1326161
    speedlist
    Participant

    Thank you Thai.

    #1326671
    Rue Nel
    Moderator

    You’re most welcome!
    We’re glad we were able to help you out.

  • <script> jQuery(function($){ $("#no-reply-1322752 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>