• Resolved jbaldwin8

    (@jbaldwin8)


    Hey team,

    I am attempting to integrate this shortcode into the Elementor Counter Widget:

    [gravitywp_count formid=”1,5″ add_number=”28000″]

    It works perfectly in the text widget, but brings up a NaN Error when added to the Counter widget.

    Could you advise how to fix the issue?

    Warm regards,
    Jonathan.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author GravityWP

    (@gravitywp)

    Hi Jonathan,

    it seems the Elementor counter widget doesn’t support shortcodes.

    Best regards, the GravityWP Team.

    Thread Starter jbaldwin8

    (@jbaldwin8)

    Hey team,

    I contacted Elementor support and the Counter widget defintely supports shortcodes, and they are looking into the bug. They came back with this question for you:

    “I’m 99.9% certain that the Gravity Count Shortcode spits out the number as a string data type and not as a int data type.

    Thats why the counters are giving the NaN (not a number) response.

    Could I ask you to contact the Gravity Count guys again and ask them about this?”

    Thread Starter jbaldwin8

    (@jbaldwin8)

    Hey team,
    This issue is not resolved, can you reopen this thread?

    Plugin Author GravityWP

    (@gravitywp)

    Hi, indeed, Count outputs a formatted number, which is in string format. A future version of this plugin will have the possibility to filter the result, so you can convert it to an integer type yourself by adding some code to your functions.php.

    I can’t promise a release date, as we are quite busy at the moment, but I think it will be within a week or 3.

    Plugin Author GravityWP

    (@gravitywp)

    Hi,

    We just deployed v0.9.8, earlier than expected.

    You can use the filter as described here:
    Is there a filter to change the output?/a>

    The raw value is numeric, when you return that it should work.

    Thread Starter jbaldwin8

    (@jbaldwin8)

    Thank you. Using a PHP snippet in the updated version of the plugin has worked.

    Thanks for your support.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘NaN Error when intergrating shortcode with Elementor Counter Widget’ is closed to new replies.