Display ACF field only if value is greater than 0

I see you’ve found your own answer, but I wanted to offer some advice for making your code a little more succinct. <?php // Different versions of a number $unformatted = get_field(‘paid_attendance’); $cleaned = str_replace(‘,’, ”, $unformatted); // Remove commas from string $integerValue = absint( $cleaned ); // Convert to absolute integer. $floatValue = number_format($cleaned, … Read more

Advanced Custom Fields Image Crop

There’s a plugin with an additional field typ with which you can force the user to crop the image to a specific size: https://github.com/andersthorborg/ACF-Image-Crop It’s not clear if it’s still under active development so you’d have to test it with newer ACF versions. There’s also one with aspect ratios instead of sizes if you need … Read more