WordPress.org

Forums

Vantage
Multilingual Metaslider (1 post)

  1. PhilipSpudd
    Member
    Posted 11 months ago #

    Hi everyone,

    I'm atm creating a multilingual website using the vantage theme and polylang plugin. I can translate all needed widgets except the Metaslider on the homepage. I know that there is a way to change sliders in different languages while creating content. An example that works for me there:

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

    But I have problems changing the slider on the homepage. The one that gets shown by the vantage_render_slider function.

    Is there a possibility to enter a similar code to the above one for this slider? Currently I'm just creating error after error...

Reply

You must log in to post.

About this Theme

About this Topic