返信先: functions.phpにてカスタムフィールドの判定ができない
ホーム › フォーラム › その他 › functions.phpにてカスタムフィールドの判定ができない › 返信先: functions.phpにてカスタムフィールドの判定ができない
2020年10月12日 1:21 PM
#91112
yasumax 様
早速のご返信有り難うございます。
初めの中略部分において
$item_name = get_post_meta($post->ID, ‘_itemName’, true);//$item_nameは取得できています。
この様にして商品の名前は取得しています。
if(post_custom( ‘test_text’ )):の代わりに
if(get_post_meta($post->ID, ‘test_text’, true)):echo’test’;endif;//testは表示しない。
この様にも書き換えてみましたがダメでした。
原因がわからず困っています。