• 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 ); } ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘ACF e post_content’ is closed to new replies.