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.

Related documentation: WPML Coding API

This topic contains 1 reply, has 2 voices, and was last updated by  Andreas Neuber 5 years, 3 months ago. The support staff assigned to this topic is Andreas Neuber.

Author Posts
Author Posts
May 15, 2013 at 9:31 am #127441

gianluca

I need help how can I use a slider on the home that changes with the php see example
<?php if ( is_front_page() || ICL_LANGUAGE_CODE==it() ) : ?>

<?php putRevSlider("home-due") ?>

<?php endif; ?>

<?php if ( is_front_page() || ICL_LANGUAGE_CODE==fr() ) : ?>

<?php putRevSlider("home-fr") ?>

<?php endif; ?>

ecc...

May 15, 2013 at 10:47 am #127458

Andreas Neuber
Forum moderator

Supporter languages: English (English ) German (Deutsch )

Hello Gianluca,

There are different possibility - you could adjust the PHP code a bit as you see it below.
If the user is on the front page and (&&) the language is Italien he will see the Italian slider:

<?php if ( is_front_page() && ICL_LANGUAGE_CODE=='it' ) : ?>

<?php putRevSlider("home-due") ?>

<?php endif; ?>

<?php if ( is_front_page() && ICL_LANGUAGE_CODE=='fr' ) : ?>

<?php putRevSlider("home-fr") ?>

<?php endif; ?>

Please let me know if this solves the problem for you.

The topic ‘[Closed] if ICL_LANGUAGE_CODE==it()’ is closed to new replies.