Skip Navigation

Waiting for author

Topic Tags: Compatibility

Overview of the issue

When using the Divi Theme Builder along with the Divi Image Helper plugin, image captions cannot be displayed or translated using WPML’s Translation Editor.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Open the …/wp-content/plugins/divi-image-helper/inc/classes/class-wp-image-module.php file.
  • Look for line .
  • Replace:
    if (0 !== $attachment_id) {
        $post_obj = get_post($attachment_id);
            
  • With:
    if (0 !== $attachment_id) {
        // WPML Workaround for compsupp-7841
        if ( class_exists('Sitepress') ) { 
            $attachment_id = apply_filters( 'wpml_object_id', $attachment_id, 'attachment', TRUE );
        }
        $post_obj = get_post($attachment_id);
            

Leave a Reply

Please stay on topic and be respectful to others. If you need help with issues not related to this post, use our Support Forum to start a chat or submit a ticket.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>