Soliloquy Blog

WordPress slider tips, Tutorials and Resources.
Different Sliders on Desktop and Mobile

How to Display Different Sliders on Desktop and Mobile in WordPress

by Waseem Abbas on November 22, 2017

Are you thinking to show unique WordPress sliders on mobile and computer screens? Sometimes you may need that when your website is browsed from desktop and mobile, it shows different image sliders on both devices. In this tutorial, we will share how to display different sliders on desktop and mobile in WordPress.

By default, you can’t create the image sliders on your WordPress website. It is recommended to use a plugin like Soliloquy that has amazing features to give you the full control over your sliders.

To display different sliders on desktop and mobile in WordPress, you’ll need to follow these 4 steps:

  • Step 1. Install and activate Soliloquy slider plugin
  • Step 2. Create two image sliders on your website
  • Step 3. Display different sliders on desktop and mobile
  • Step 4. Add the additional CSS to hide the sliders

Ready to get started? Let’s go!

Step 1: Install and Activate Soliloquy Slider Plugin

The first thing you need to do is to install and activate the Soliloquy slider plugin on your WordPress website.

Soliloquy website

Wondering how to do it? Check out this complete installation guide of Soliloquy to easily install the plugin in WordPress.

Step 2: Create two image sliders on your website

Upon activating the plugin, you need to go to Soliloquy » Add New from your WordPress admin to create the first slider for desktop.

Let’s start by adding a title and drop the photos in the Native Slider section.

Add New Slider

After adding the photos, hit the Publish button. Simply repeat the process to create another slider for mobile devices.

For basic settings, you should check out this complete guide on how to create an image slider in WordPress.

Step 3: Display Different Sliders on Desktop and Mobile

Go ahead and edit the two image sliders one by one. You need to copy the shortcodes from Soliloquy Slider Code widget of both the sliders.

Copy Shortcode

Next you need to go to Posts » Add New or edit an existing post. Paste the shortcode of both the sliders in the visual editor.

Add Shortcode

Make sure to click on the Publish/Update button. Simply visit your website from desktop and mobile devices to see the two different image sliders on one page that will look like as shown in this image below:

Different Sliders on Desktop and Mobile

Step 4: Add the Additional CSS to Hide the Sliders

Now you have the two image sliders in one WordPress post. It’s the time to add CSS to display different sliders on desktop and mobile screens.

Simply go to Appearance » Customize from your WordPress admin. In the Additional CSS section, paste this code:

[php]

/*This is the mobile slider */

#soliloquy-container-4985 {

display: none !important;
}

@media only screen and (max-width: 600px) {

/*This is the desktop slider */

#soliloquy-container-4986 {

display: none !important;
}

/*This is the mobile slider */

#soliloquy-container-4985 {

display: block !important;
}

}

[/php]

This CSS snippet will hide the desktop slider on mobile devices and mobile slider on desktop screens. You need to replace 4985 and 4986 with your respective Soliloquy slider codes (edit the image sliders to find the code in the Soliloquy Slider Code widget).

It will now display unique sliders on desktop and mobile devices.

That’s all! We hope this tutorial has helped you to learn how to display different sliders on desktop and mobile in WordPress. You may also want to check out our guide on how to create a responsive slider for Envira Gallery. In case, your slider images are loading slow, check out this ultimate guide to boost speed and performance.

If you like this tutorial, then please follow us on Facebook and Twitter for more free WordPress guides and resources.

Waseem Abbas is a content writer for SoliloquyWP and Envira Gallery.

Comments

    Frank

    June 21, 2019

    Soliloquy is sold as a responsive slider. This method is not responsive. No way to change the amount of slides (columns) on a carousel slider on mobile? Very basic responsive feature. Any tips how to do this please?

    Reply

      Barbi Atkinson

      June 24, 2019

      Hi Frank and thanks for your feedback! We do give the ability to turn the Carousel off for mobile with a checkbox but not an option to change the amount of slides. However, I’ve requested this for you as a possible future feature request. There’s no guarantees that it will be implemented but it will be reviewed and discussed. If we can help with anything else, please feel free to reach out to our support! https://soliloquywp.com/contact/

      Reply

Leave a Reply

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.