Support

Account

Forum Replies Created

  • I had a similar problem where the checkbox had been checked, creating the key, and then being unchecked at a later time. I seemed to have fixed it with this (‘rented’ is the checkbox field):

    'meta_query' => array(
      'relation' => 'AND',
      array(
        'key' => 'status',
        'value' => 'active',
      ),
      array(
        'relation' => 'OR',
        array(
          'key' => 'rented',
          'value' => '1',
          'compare' => '!='
        ),
        array(
          'key' => 'rented',
          'value' => '1',
          'compare' => 'NOT EXISTS'
        )
      )
    )
  • This should work for you. Make the field name ‘the_content’. I am wrapping this up into a plugin and will also include the_excerpt, and featured_image.

    function hg_acf_save_content( $value, $post_id, $field )
    {
    	wp_update_post( array( 'ID' => $post_id, 'post_content' =>  $value ) );
    	return $value;
    }
    add_filter('acf/update_value/name=the_content', 'hg_acf_save_content', 10, 3);
Viewing 2 posts - 1 through 2 (of 2 total)