Support

Account

Forum Replies Created

  • Had some more time and did further testings, and solved it by adding this to my functions.php before loading the translation action.

    function acf_translate_fields( $field )
    {
    	$field['label' ] = __( $field['label' ], 'domain'  );
    	$field['instructions' ] = __( $field['instructions' ], 'domain'  );
    
    	return $field;
    }
    add_filter('acf/load_field' , 'acf_translate_fields' );
  • That doesn’t seem to be related to the issue, doesn’t matter where i move the translation action before / or after the fields are loaded

    Right now my function file is like

    – require_once to file with fields

    – action that tells wordpress to load translation

    I also tried

    – action that tells wordpress to load translation

    – require_once to file with fields

    None of the above fixed the issue.

  • Same as above, the po file is picking up the strings however the data isn’t being translated.

  • Hello,

    I’m having the same issue, i’ve exported the fields and i’m trying to translate them for the front-end acf form however the translation file doesn’t work, it works for every other string in the theme but the acf fields.

    How would we fix this problem ?

  • Hi,

    Thanks for your reply, i managed to make it work however i have an issue with a few fields.

    The create new post form, successfully creates the listing and i’m also grabbing the post title and the post content and the featured image through custom fields. This works.

    I have then attempted to modify the action so instead of inserting a new post, he would update it. The edit works but some of the fields are not updating. For example when i modify the post and i attempt to modify the custom field that has been used for the post title, it isn’t updating the post title but just the custom field.

    This is part of the code used.

    global $current_user;
    
        // check if this is to be a new post
        if( $post_id != 'new_listing' )
        {
            return $post_id;
        }
     
        // Create a new post
        $post = array(
            'post_status'  => get_field('default_listing_submission_status','option') ,
            'post_title'  => $_POST["fields"]['field_522f30035c85b'],
            'post_content' => $_POST["fields"]['field_5230848453094'],
            'post_type'  => 'listing' ,
        );
    
        $post_edit = array(
            'post_status'  => get_field('default_listing_submission_status','option') ,
            'post_title'  => 'test',
            'post_content' => 'test2',
            'post_type'  => 'listing' ,
        ); 
    
     //add listing
        if( $post_id = 'new_listing' ) {
        	$post_id = wp_insert_post( $post );
        } else {
        	$post_id = wp_update_post( $post_edit );
        }
    

    Do you have any idea why the form wouldn’t update the post title or the content ?

    Thank you. If needed i can post the whole code but i don’t anything else in the action is interfering with it.

  • It doesn’t need to be in a loop. I found out the issue is related to this

    http://support.advancedcustomfields.com/forums/topic/using-options-page-fields-in-functions-php/

    since the repeater field i created is from an option not a custom field.

  • Thank you for your help, so basically i can include acf & the theme options addon into a premium plugin but i have to remove the update script?

    Sorry if i sound stupid I’m just making sure i won’t have any problems with licenses.

    Thank you.

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