Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: Asia/Singapore (GMT+08:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Kor 4 months ago.

Assisted by: Kor.

Author Posts
July 30, 2024 at 4:34 pm #16021629

lodeD

Hello Kor,

Any news?
I also have a problem with icons that have links behind on 2 other types of pages that do not point to the translated pages:

first page is: hidden link
Second page type (there are 9 of them): eg hidden link

See examples of the icons in attachment.

Kind regards,

Lode

July 30, 2024 at 4:54 pm #16021678

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for reporting this.

Our 2nd Tier Support requested that we replicate the issue on our sandbox site here hidden link .

Could you create some test products with "internal URL" icon links?

July 30, 2024 at 6:14 pm #16021862

lodeD

Hello Kor,

Thank you. The products are not the problem, but again the links to the landingpages, like it was on the main topic.
I have created a copy of the page template I use and copied it to "Test EN" and added an icon of an electric car and linked it to a EN Landingpage and translated it to Dutch.

Then again, the link on the Dutch page is pointing to the EN landingpage instead of the Dutch version.

Kind regards,
Lode

August 1, 2024 at 4:57 pm #16030852

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

Please insert the custom PHP code below into your theme's functions.php file. I've tested and it works fine on our sandbox. Please let me know how it goes.

add_filter( 'wpml_pb_elementor_widget_dynamic_id_converters', function( $converters ) {

    $isLottieIcon = \WPML\FP\Relation::propEq( 'widgetType', 'icon' );
    $isLottieImageBox = \WPML\FP\Relation::propEq( 'widgetType', 'image-box' );
    $isLottieImage = \WPML\FP\Relation::propEq( 'widgetType', 'image' );

    $lottieLinksLens = \WPML\FP\Obj::lensPath( [ 'settings', '__dynamic__', 'link' ] );

    return array_merge(
        $converters,
        [
            [ $isLottieIcon, $lottieLinksLens, 'internal-url', 'post_id' ],
            [ $isLottieImageBox, $lottieLinksLens, 'internal-url', 'post_id' ],
            [ $isLottieImage, $lottieLinksLens, 'internal-url', 'post_id' ],
        ]
    );

} );

The topic ‘[Closed] Product Icon Links are not working correctly’ is closed to new replies.