Easily Add Gesture Support to Your WordPress Site

2025-10-24

Google has been emphasizing the importance of mobile content over the past few years. If you are a webmaster, it is really important for your website to be mobile-friendly unless you are not concerned about the traffic coming from mobile devices, which could easily make up 30% of the overall traffic.

One important factor of the mobile device is its small screen (as compared to a desktop), which is why responsive web design has become a popular solution to make the website render well in various screen sizes. Another factor that has been overlooked by webmasters is the support for gestures. Most, if not all, mobile devices these days make extensive use of gesture actions (swipe, pinch, double tap, etc.) whereas most websites are still using the conventional mouse point and click way to navigate the site. In this article, I am going to show you how you can easily add gesture support to your WordPress site.

Tocca.js is a very simple javascript that can detect gesture action like “tap,” “double tap,” “swipe up,” “swipe down,” “swipe left.” Unless you are a developer, you won’t know what to do with it. This is where the Gestures plugin comes in. It makes use of the Tocca.js script and adds gesture support to your site.

Usage

1. Download Gestures from its Github page. Extract the archive and upload the folder to your WordPress plugins directory.

2. Activate the plugin in the Plugins section of WordPress.

3. Go to “Settings -> Gestures.” This is where you can configure the settings .

wp-gesture-settings

The “Content container identifier” field is the area on the site where you want the gesture to be activated. It is usually set to the main content div. For example, for our theme, the main content resides under the class="content" div, thus we will enter .content in the Content container identifier field.

For the next field, enter the URL where the user will be redirected to when they double tap on the site. This is usually set to the Home page of the site.

4. Once you are done, click “Save Changes.” That’s it. You can now load your site on your mobile and test out the swipe left/right action.

Things to note

1. The Gestures plugin depends on the prev/next tag on your theme header to work. Some themes are known to strip off these tags as they are not useful in most cases. WordPress SEO and several other plugins are also known to strip off these tags. If you can’t get Gestures to work, this is probably the reason.

One of the ways to tackle this is to add back the prev/next tag in your theme header. To do this, open up the functions.php file in your theme folder and add this line at the end.

add_action( 'wp_head', 'adjacent_posts_rel_link_wp_head',50 );

2. If you are not sure of the content container identifier for your theme, you can make use of the Developer Tools in Google Chrome to find the container div. In Google Chrome, right click on the main content area and select “Inspect Element.” The Inspector window will show up and highlight the current location where you click. Scroll upward to find its parent div. That will most probably be the container that you are looking for.

wp-gesture-find-container-class

3. To test the gesture action on desktop, simply click and hold your mouse and drag left/right. This is equivalent to swiping left and right on the mobile.

That’s it. Try it out and let us know if this works for you.

Comments on " Easily Add Gesture Support to Your WordPress Site" :

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    Related Article

    How to Configure The Tabbed Inbox In Gmail
    INTERNET

    How to Configure The Tabbed Inbox In Gmail

    Google has recently introduced the new tabbed inbox in Gmail. This new interface will auto-sort your

    4 Reasons Why A Third Party DNS Server Is Better Than What Your ISP Gives You
    INTERNET

    4 Reasons Why A Third Party DNS Server Is Better Than What Your ISP Gives You

    You’ve probably heard of alternate DNS servers and how they could probably help you in some way or

    How to Copy All Links on a Web Page in Firefox
    INTERNET

    How to Copy All Links on a Web Page in Firefox

    Has there ever been a time where you wanted to copy all links on a web page while browsing? Or maybe

    How to Create QR Codes on DuckDuckGo
    INTERNET

    How to Create QR Codes on DuckDuckGo

    DuckDuckGo is a search engine that focuses on privacy and anonymity. We’ve talked about it in the

    Use History Eraser to Quickly Wipe Your History in Chrome
    INTERNET

    Use History Eraser to Quickly Wipe Your History in Chrome

    Did you know that when you visit a site in your browser, it will leave a trace in your browser’s h

    How to Check Links for Viruses in Google Chrome
    INTERNET

    How to Check Links for Viruses in Google Chrome

    One of the many security worries when using the Internet is clicking on a virus-leading link. There�

    How to Get Rid of the Stickers in Comments on Facebook
    INTERNET

    How to Get Rid of the Stickers in Comments on Facebook

    One of the latest goodies to come into action on Facebook is stickers in comments. Recently, Faceboo

    8 Common Browser Error Messages That You Should Know
    INTERNET

    8 Common Browser Error Messages That You Should Know

    If you have been surfing the web regularly, I am sure you have come across websites showing error co

    About Netverse

    We are a premier digital platform committed to delivering high-quality content to our readers. Our mission is to provide accurate, reliable, and engaging information that adds value to our audience's daily lives.

    Our team consists of experienced content creators and subject matter experts who uphold the highest standards of professionalism. In an era of information overload, we curate content with care, ensuring our users receive only the most relevant and trustworthy information.

    Beyond just reporting facts, we focus on depth and context. Through expert analysis, comprehensive research, and clear presentation, we help our audience gain meaningful insights and make informed decisions.

    We take pride in being a trusted information source for our growing community of readers. Our user-first approach means we continuously adapt to provide content that meets our audience's evolving needs and interests.

    Innovation and excellence drive everything we do. We're committed to improving our platform and services to deliver the best possible experience for our users.