Soliloquy Documentation

Documentation, Reference Materials, and Tutorials for Soliloquy

Disable Touchswipe on Mobile

Important: This doc assumes you’re comfortable creating and/or editing PHP files in your WordPress installation and is intended for advanced users.

You can disable touchswipe on mobile devices for your Soliloquy sliders following this guide.

Step 1 – Create Plugin File

The first step is to create a new php file in the wp-content/plugins/ directory of your WordPress installation. The easiest way to do this is using your favorite FTP program or through your web hosting account’s file editor (if they provide one).

Once you’ve navigated to the wp-content/plugins/ directory, create a new file with the name soliloquy-disable-touchswipe-mobile.php

Step 2 – Edit the New Plugin File

Next, you’ll want to copy and paste the following code into the soliloquy-disable-touchswipe-mobile.php plugin file you’ve created:

<?php
/**
* Plugin Name: Soliloquy - Disable Touchswipe on Mobile
* Plugin URI: https://soliloquywp.com
* Version: 1.0
* Author: Tim Carr
* Author URI: http://www.n7studios.co.uk
* Description: Disable touchswipe on mobile
*/

/**
* Disable touchswipe on mobile
*/
function sol_soliloquy_disable_touchswipe_mobile() {
	
	if ( wp_is_mobile() ) {
		?>
		touchEnabled: false,
		<?php
	}
	
}
add_action( 'soliloquy_api_config_start', 'sol_soliloquy_disable_touchswipe_mobile' );

Step 3 – Activate the New Plugin

The last step is to navigate to the WordPress Admin > Plugins screen, locate the plugin named Soliloquy – Disable Touchswipe on Mobile and activate the plugin.

That’s it! You’ve successfully disabled touchswipe for your sliders on mobile!

[i]
[i]