Support

Account

Home Forums Front-end Issues Problem save meta values Reply To: Problem save meta values

  • Hi John.
    I use a plugin called Content Crawler that copy products from other stores and publish it on my site. There’re many options, for example how to get titles, content, images, etc, and one of this options is to add post meta key, that I’m using with the ACF plugin. My problem is that some fields are only displayed when I save and publish the post, but no if I publish directly after crawling. For example:

    Example 1: Select field called “games” is displayed if the post is published directly with this code:

    <?php
    if( get_field('games') == 'option1' ): ?>
    	<a href="https://www.site.com/games/option1/">Option 1</a>
    <?php endif; ?>

    Example 2: Select field called “company” isn’t displayed if the post is published directly with this code:

    <?php 
    $field = get_field_object('company');
    $value = get_field('company');
    $label = $field['choices'][ $value ];
    echo $label;
     ?>

    Example 3: Text field called “source” isn’t displayed if the post is published directly with this code:
    <?php echo the_field('sources'); ?>

    In summary, I have draft products created with a crawling plugin that contains meta-keys, and this meta-keys are only displayed when I open each draft product one by one and publish it, If I publish directly without open it or select multiple draft products and I the bulk option to publish it, the fields aren’t displayed. I hope this explanation will be more understandable, sorry for my bad English.