これは少し奇妙です、私は "update_post_meta"を使ってWordpressのカスタムフィールドを更新しています。私はupdate_post_meta($ post_id、 'Test_Field'、 'Test Value')を実行します。カスタムフィールドの更新問題のない私はそれが更新されない文字列値を使用する場合:あなたの助けをWordpress update_post_metaは動的値を更新しません
$test_value = "Test";
echo $test_value; // No problem here
echo $post_id; // No problem here
update_post_meta($post_id, 'Test_Field', $test_value);
事前のおかげで非常に多くの
ステュー
二重引用符で修正されていますが、誰でも知っていますか? update_post_meta( "$ page_id"、 "Test_Field"、 "$ test_value"); – Stuart
どのように$ post_idを割り当てていますか?ちょうど推測 - すべてがうまく見えます、率直に。 – Bosworth99