Support

Account

Home Forums General Issues Imported Field post_meta not displaying on front-end Reply To: Imported Field post_meta not displaying on front-end

  • Well.. I decided to just run an init query through every post and add the field values back into themselves. Here’s a snippet of what I used: (add once to functions, refresh /wp-admin, delete code)

    function process_post() {
    	$my_posts = get_posts( array('post_type' => 'page', 'posts_per_page' => -1 ) );
    	foreach ( $my_posts as $my_post ) :
    		$value = get_field('field_560094b2af64e', $my_post->ID );
    		if($value):
    			update_field( 'field_560094b2af64e', $value, $my_post );
    		endif;
    	endforeach;
    }
    add_action( 'init', 'process_post' );