Overview of the Issue
You may encounter an issue where the internal URL in the Nectar Slider of the Salient theme doesn’t automatically adjust when switching to a translated version of your site. This occurs after translating a Nectar Slider post that includes an internal URL in the Button Link.
Workaround
This issue is fixed in WPML 4.7. Updating solves it on your site, so you only need this workaround if you can’t update yet.
Please, make sure of having a full backup of your site before proceeding.
- Open your …/wp-content/plugins/salient-nectar-slider/includes/frontend/helpers.php file.
- Look for line 814.
- Replace:
PHP
if ( ! empty( $button_1_text ) ) { $button_1_link = ! empty( $button_1_link ) ? $button_1_link : '#';
- With:
PHP
if ( ! empty( $button_1_text ) ) { // WPML Workaround for compsupp-7240 if (class_exists('Sitepress') && ! empty( $button_1_link ) ) { $current_lang = apply_filters( 'wpml_current_language', NULL ); $button_1_link = apply_filters( 'wpml_permalink', $button_1_link, $current_lang, true ); } $button_1_link = ! empty( $button_1_link ) ? $button_1_link : '#';