Important notice: we will respond to all open ticket requests up until November the 1st. After this date, we will be unable to process the ticket requests here on Ticksy.

Okay
  Public Ticket #1847564
Elated Counter thousand separator
Closed

Comments

  • Radek started the conversation

    Is there any way I can add a separator in thousands (space or comma) to elated counter?

    Thank you,
    Radek

  •  1,845
    Elated replied

    Hi,

    Thank you for writing in.

    Yes, there is a way through JavaScript.

    Go to Elated Options -> General then scroll down, you will see Custom js field, just paste this code

    var elCount = document.querySelectorAll('.eltd-counter');
        if(elCount) {
            elCount.forEach(function(num, index){
            const content = num.textContent;
            if(content.length >= 4) {
                const newValue = content.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,');
                elCount[index].innerHTML = newValue;
            }
        });
    }
    

    Let us know if there is anything else we can help you with.

    Cheers,

    Nikola


    The Elated Support Center has been moved to our centralized support platform. 

    Please note that any existing tickets prior to this change will be answered right here on Ticksy, and in due time. 

    If you wish to submit a new support request, for all new inquiries please head on to our Help Center.

    Elated Themes is part of Qode Interactive – the home of 300+ premium WordPress themes.

    Don’t forget to sign up for our newsletter and be the first to find out all the latest news.

  •   Radek replied privately
  •  1,845
    Elated replied

    Hello Radek,

    Unfortunately the script that my colleague provided is not compatible with the script of the counter and such an option, unfortunately, does not exist within the theme, we are sorry. Achieving this will require some custom coding, but we are not in a position to accept any custom work, because we primarily need to focus on providing Theme Support to all customers. We hope you understand.

    In case you are not familiar with programming, you could hire someone to do this for you. You could look for someone to hire for this kind of job at the following link: - http://studio.envato.com

    Thanks for understanding.

    Kind regards,

    Sean


    The Elated Support Center has been moved to our centralized support platform. 

    Please note that any existing tickets prior to this change will be answered right here on Ticksy, and in due time. 

    If you wish to submit a new support request, for all new inquiries please head on to our Help Center.

    Elated Themes is part of Qode Interactive – the home of 300+ premium WordPress themes.

    Don’t forget to sign up for our newsletter and be the first to find out all the latest news.