Home Forums Backend Issues (wp-admin) Emojis are removed from ACF text field


Emojis are removed from ACF text field

  • Hi,

    I created an ACF field to save text with emojis. But when I update the post with text and emoji, the changes are not saved.

    What code should I add on functions.php to urlencode() the emojis (on this specific field only) on the database ?


  • I tried this code, but it’s not working, do you know why by any chance ?

    function my_acf_save_post( $post_id ) {

    if( isset($_POST[‘acf’][‘card_lancement_texte’]) ) {
    $_POST[‘acf’][‘card_lancement_texte’] = urlencode($_POST[‘acf’][‘card_lancement_texte’]);

    return $_POST[‘acf’][‘card_lancement_texte’];

    add_action(‘acf/save_post’, ‘my_acf_save_post’, 5);

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

The topic ‘Emojis are removed from ACF text field’ is closed to new replies.