Home » Php » php – WordPress custom field values (Variables) updates only after page refresh

php – WordPress custom field values (Variables) updates only after page refresh

Posted by: admin February 25, 2020 Leave a comment

Questions:

I created variables with custom field values in the page/post edit window. However, the variables don’t update after the post/page update until I refresh the page. But, the no-variable versions reflect the changes correctly. Any ideas why this is happening? I have tried running a form there but it didn’t work.

My code looks like below

$titleContent = esc_attr( get_post_meta( get_the_ID(), 'fournal_title', true ) );
How to&Answers: