Function or shortcode to change custom field value

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?

Hello @marketfresh,

Thanks for writing in! Regretfully, this particular customization request is outside the scope of our support as this is not related to an issue with the theme and instead has to do with your customization of it. As such, you will need to investigate this particular issue on your own or seek help from a developer should you not feel comfortable making these changes yourself. If you have any further questions about the theme, we are more than happy to provide you with assistance on these inquiries.

In the meantime, please create a thread in Peer Forum. Someone might have done this before and be able to help you.

Thank you for your understanding.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.