Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 504799

ACF e post_content

$
0
0

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 ); } ?>

Viewing all articles
Browse latest Browse all 504799

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>