Home › Forums › General Issues › ACF data not showing in the front without a manual post update. › Reply To: ACF data not showing in the front without a manual post update.
Thanks John,
I approached this a different way
I changed the Choices from value : Label to just Choice Value
Part Source:
sh : SECOND HAND
oem : OEM
new : NEW
Part Source:
SH
OEM
NEW
Used Admin Columns Pro 100 products per page, 15 pages – and bulk edited changing the value of the part source to “SH” along with other choice values “OEM” , “NEW”.
Then in my PHP added the conditional on the output.
global $product;
$id = $product->get_id();
$partsource = get_field ('part_source', $id);
if( $partsource == 'SH') {
echo 'SECOND HAND';
} else {
echo esc_attr($partsource);
}
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.