Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Slider code required

Home / Forums / Virtue Theme / Slider code required

This topic is: Resolved
[Resolved]
Posted in: Virtue Theme
February 5, 2016 at 9:30 pm

Hello,

Previously, I had a code given for cyclone sliders on individual products, that I had inserted in my functions.php file in the child theme. It had a check for languages too…

add_action( 'kt_afterheader', 'kt_woocommerce_single_head_slider', 10 );
function kt_woocommerce_single_head_slider() {
if (class_exists('woocommerce')) {
if(is_product()) {
if(ICL_LANGUAGE_CODE=='en') {
echo do_shortcode('[cycloneslider id="1-english"]');
} else {
echo do_shortcode('[cycloneslider id="1-dutch"]');
}
}
}
}

I would like the mobile versions for both the languages to be added to this code too…

The code for desktop + mobile version given to me was:

<div class="kt-desktopslider">[cycloneslider id="1-english-desktop"]</div><div class="kt-mobileslider">[cycloneslider id="1-english-mobile"]</div>

<div class="kt-desktopslider">[cycloneslider id="1-dutch-desktop"]</div><div class="kt-mobileslider">[cycloneslider id="1-dutch-mobile"]</div>

How do I incorporate these two lines in the above code or does the code need to change?

Your help would be appreciated.

Kind Regards

  • The forum ‘Virtue Theme’ is closed to new topics and replies.