Replies: 0
Hi
Hi, I created custom fields with ACF. I would like to save these fields in the database, the content of the post (POST_CONTENT). I created the code, but to display the custom fields, I always have to make the page refresh.
<?php
if ( get_field('descrizione') ) {
$postid = get_queried_object_id();
$my_post = array(
'ID' => $postid,
'post_content' => get_field('descrizione'),
);
wp_update_post( $my_post ); } ?>