I found this shortcode on the web that changes the number formatting of my custom fields to include commas and remove decimals. I just drop the PRO dynamic code into the shortcode and it works great:
function format_my_number($atts) {
$num = $atts[“value”];return number_format($num, 0, ‘.’, ‘,’);
}
add_shortcode(“custom-number-format”, “format_my_number”);
Now, I need a shortcode (or function) that changes a custom field value. Here’s the logic I need:
IF custom field = “specific value” THEN change custom field value to "different value"
Can anyone help with this please?