Change slider according to URL (language)
-
I use wmpl and LayerSlider, however, this multilanguage thing is too complicated for a non-developer like me, so I set up 2 different sliders, one in English and one in German.
So far so good…
I set them up on the WP page home and set up a widget sidebar, BUT the slider is in the foreground and my sidebar in the background! What the??? This must be a feature, not a bug…
I would like to, however, put the slider in the header.php and not on the WP page home… Does that make sense?
My code is:
<?php
// Display slider with correct language on homepage
$url = ‘https://www.jessicavoiceover.com/?lang=de’ . $_SERVER[‘SERVER_NAME’] . $_SERVER[‘REQUEST_URI’];
if (true !== strpos($url,’?lang=de’)) {
echo ‘<?php layerslider(6) ?>’;
} else {
echo ‘<?php layerslider(5) ?>’;
}
?>This spits out absolutely nothing!
Can anyone help me with this php code? I am helpless here and I’ve already spent DAYS trying to figure out how to design my homepage, it’s very upsetting…
- The topic ‘Change slider according to URL (language)’ is closed to new replies.