Home › Forums › Backend Issues (wp-admin) › Alter field output › Reply To: Alter field output
I’m not familiar with ACF but, how would the above output ‘Call for Price’ I don’t see a check for anything in the if statement or an alternative (elseif, else) if there isn’t a numeric value entered. Is this a built in function?
Sorry if this is simple, I might be dense, it is early here.
But wouldn’t you need to do something like:
$price = $row['service_price'];
if( $price > 0 ){
$price = '$' . $price;
}
else {
$price = 'Call for Price';
}
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.