Home>Support>Home page slider multiple languages

Home page slider multiple languages

Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

Hey guys,

first of all, your theme is brilliant! I absolutely love it!

1 question though:
how can I use different home page sliders when I switch the language?

I am using the WPML plugin for languages.

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 10 years, 11 months ago Andrew Misplon
    Hi, I Work Here

    Hi Alexander

    Thanks for your positive feedback, glad to hear Vantage is working out.

    You can, but it requires a custom theme and a little custom development work. Here is a thread discussing the matter: https://siteorigin.com/thread/multilingual-metaslider-on-homepage/

    In summary:

    <?php vantage_render_slider() ?>

    in header.php needs to be replaced with the conditional being discussed in that thread:

    <?php
    
    $currentlang = get_bloginfo('language');
    
        if( is_front_page()) {
    
             if($currentlang=="en-US") {
                     echo do_shortcode('[metaslider id=8]'); // English
             }
    
             if($currentlang=="de-DE") {
                     echo do_shortcode('[metaslider id=30]'); // German
             }
    
             if($currentlang=="es-ES") {
                     echo do_shortcode('[metaslider id=32]'); // Spanish
             }
    
             if($currentlang=="ca-CA") {
                     echo do_shortcode('[metaslider id=33]'); // Catalan
             }
    
             if($currentlang=="nl-NL") {
                     echo do_shortcode('[metaslider id=34]'); // Dutch
             }
        }
    ?>

    header.php needs to be contained within a child theme.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More