Support

Account

Home Forums General Issues Does ACF cache values in wp_postmeta?

Helping

Does ACF cache values in wp_postmeta?

  • I’m getting a strange result from a database query. The project I’m working on is a magazine where each issue is a CPT of issue. In these posts, there is an ACF checkbox which can be toggled to determine if the issue is the the current issue. There should only be one current issue at a time (obviously). When I look at the issue posts, that’s what I see one current issue and the rest are not. However when I run the following code, I get 2 results back and when I look at the db with Sequel Pro, that’s what I see as well – 2 posts

    $results = $wpdb->get_results("
        select * from wp_postmeta where meta_key like 'is_current' and meta_value = 1
    ");
  • Hi @aberkow

    Is it possible that this issue is as a result of WP revisions?

    Does the same replicate when revisions are turned off?

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Does ACF cache values in wp_postmeta?’ is closed to new replies.