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.

This topic contains 3 replies, has 2 voices.

Last updated by Andrés 1 year, 4 months ago.

Assigned support staff: Andrés.

Author Posts
May 21, 2018 at 5:02 pm #2202950

boulouS

Tell us what you are trying to do? I want to see my slider in english home page

Is there any documentation that you are following? no

Is there a similar example that we can see? no

What is the link to your site? hidden link

May 22, 2018 at 11:09 am #2207446

Andrés
Supporter

Languages: English (English ) Spanish (Español ) French (Français )

Timezone: Europe/Paris (GMT+02:00)

Hello Sandra,

I just replied your french ticket, could we continue there?

Best regards,
Andrés

May 23, 2018 at 6:43 am #2212818

boulouS

I Andrès, I succed to create slide in english with this function in functions.php :

/* META SLIDER */

add_action( 'storefront_before_content', 'marce_custom_slider_storefront' );
function marce_custom_slider_storefront() {
if ( is_front_page() ) {
if (ICL_LANGUAGE_CODE == 'fr'){
echo do_shortcode("[metaslider id=french]");
}else{
echo do_shortcode("[metaslider id=english]");
}
}
else {}
}

First we have to create the 2e slider in english for exemple

May 23, 2018 at 7:10 am #2212930

Andrés
Supporter

Languages: English (English ) Spanish (Español ) French (Français )

Timezone: Europe/Paris (GMT+02:00)

I'm glad you were able to solve it, I used this code and it was working fine, that's why I thought the problem came from the slider and not the code.

add_action( 'storefront_before_content', 'marce_custom_slider_storefront' );
function marce_custom_slider_storefront() {
	if ( is_page( 6066 ) ) {
		echo do_shortcode("[metaslider id=6322]");
	} elseif ( is_page( 6070 )) {
		echo 'WPML test';
	}
}

Regards,
Andrés