Title: PHP IF
Last modified: February 14, 2018

---

# PHP IF

 *  Resolved [jaworowicz](https://wordpress.org/support/users/jaworowicz/)
 * (@jaworowicz)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/php-if/)
 * How create IF PHP code ?
    like WPML?
 *     ```
       <?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; ?>
       ```
   

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Thread Starter [jaworowicz](https://wordpress.org/support/users/jaworowicz/)
 * (@jaworowicz)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/php-if/#post-9972685)
 * Ok, problem solved.
 *     ```
       if ( wpm_get_language() == 'pl' ) {
       echo 'PL';
       }
   
       if ( wpm_get_language() == 'en' ) {
       echo 'EN';
       }
   
       if ( wpm_get_language() == 'de' ) {
       echo 'DE';
       }
       ```
   
 *  [Anticosti](https://wordpress.org/support/users/anticosti/)
 * (@anticosti)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/php-if/#post-9985635)
 * Hi [@jaworowicz](https://wordpress.org/support/users/jaworowicz/),
    Just curious…
   Why and where do you use this code? Any special hint? Do you have to use this
   code with Rev Slider to make it use a specific page based on a specific language?
 * Thank you for your input.
 *  Thread Starter [jaworowicz](https://wordpress.org/support/users/jaworowicz/)
 * (@jaworowicz)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/php-if/#post-9985645)
 * Replace `echo 'pl'` by function with revslider shortode / or anything you need.
 *     ```
       if ( wpm_get_language() == 'pl' ) { 
       putRevSlider("slider-pl")
       } 
       if ( wpm_get_language() == 'en' ) 
       { 
       putRevSlider("slider-en")
       } 
       if ( wpm_get_language() == 'de' ) { 
       putRevSlider("slider-de")
       }
       ```
   
 * Where: template or custom template file eg. page-home.php
 * I had to load different things and scripts depending on the language – actually
   in WPML I often use the code from the first post – that’s why I was looking for
   a similar solution for your plugin.
 * it can be anything including activating or deactivating actions and filters 🙂
   and not just adding content or slider.
    -  This reply was modified 8 years, 3 months ago by [jaworowicz](https://wordpress.org/support/users/jaworowicz/).
    -  This reply was modified 8 years, 3 months ago by [jaworowicz](https://wordpress.org/support/users/jaworowicz/).
    -  This reply was modified 8 years, 3 months ago by [jaworowicz](https://wordpress.org/support/users/jaworowicz/).
    -  This reply was modified 8 years, 3 months ago by [jaworowicz](https://wordpress.org/support/users/jaworowicz/).
 *  [Anticosti](https://wordpress.org/support/users/anticosti/)
 * (@anticosti)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/php-if/#post-9985683)
 * Hey Thank You [@jaworowicz](https://wordpress.org/support/users/jaworowicz/)
   
   Bookmarked for further use. Thank you for your contribution and time. Have a 
   great weekend!!!
 *  [jordanwebdev](https://wordpress.org/support/users/jordanwebdev/)
 * (@jordanwebdev)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/php-if/#post-10214774)
 * thanks [@jaworowicz](https://wordpress.org/support/users/jaworowicz/), this helped
   me too. Just curious, how did you find out the name of the function? Is there
   documentation somewhere?
 *  Thread Starter [jaworowicz](https://wordpress.org/support/users/jaworowicz/)
 * (@jaworowicz)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/php-if/#post-10214789)
 * No.
    Experimet after analyse The plug-in Code 🙂

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘PHP IF’ is closed to new replies.

 * ![](https://ps.w.org/wp-multilang/assets/icon-256x256.png?rev=1760406)
 * [WP Multilang - Translation and Multilingual Plugin](https://wordpress.org/plugins/wp-multilang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-multilang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-multilang/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-multilang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-multilang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-multilang/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [jaworowicz](https://wordpress.org/support/users/jaworowicz/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/php-if/#post-10214789)
 * Status: resolved