• Hello,

    I hope you are well.
    I use your plugin which is great.
    However, I also use the ACF plugin. But your plugin doesn’t work with the Wysiwyg fields of the ACF plugin.

    So you can set the “rel” attribute manually for each image, but it’s not practical at all.

    Do you have a solution for making your plugin work automatically with ACF fields?

    Sorry for my English, I’m French.

    Thank you

    Have a nice day

    Claudia

Viewing 1 replies (of 1 total)
  • Thread Starter Akro Web

    (@akro-web)

    I’ve found the solution.
    Here is the code to put in your theme’s functions.php file:

    // AJOUT AUTOMATIQUE ATTRIBUT REL IMAGE ACF
    function ajouter_rel_aux_liens_des_images_acf($content) {
    // Ajouter l’attribut “rel” aux liens d’images
    $content = preg_replace(
    ‘/]+)>]+)><\/a>/i’,
    ”,
    $content
    );
    return $content;
    }
    add_filter(‘acf_the_content’, ‘ajouter_rel_aux_liens_des_images_acf’);

    Have a nice day

    Claudia

Viewing 1 replies (of 1 total)
  • The topic ‘Problem with ACF plugin fields’ is closed to new replies.