• Resolved axeffekt

    (@axeffekt)


    I love this plugin especially the Baseball add-on.

    Did I miss something or made an error?
    How is it posslible to display important Baseball Stats like AVG and PCT like .250 and not like 0.250?

    Is it even possible?
    Would be great to get a solution on that.

    Best regards
    Alex

Viewing 3 replies - 1 through 3 (of 3 total)
  • Roch

    (@rochesterj)

    Hi Alex!

    Thanks for reaching out.

    In general, we don’t have an option for this. You’ll need to create a custom formatting function to remove leading zeros from stats.

    Thanks!

    Thread Starter axeffekt

    (@axeffekt)

    Hi Roch,
    thank you for responding so fast.
    Do have an idea of how such a function looks like?

    Thank you for your support
    Alex

    Roch

    (@rochesterj)

    Hi Alex!

    Thanks for your reply.

    I don’t have any functions for this at the moment, and I couldn’t find any quick answers. But it shouldn’t be too hard, you just need to be careful not to remove the leading number if it’s bigger than 1 (so if $stat > 1, $stat = substr($stat, 1 or similar).

    You can use the WP filters to access the stats directly, or edit the template files.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Baseball Stats without leading “0”’ is closed to new replies.