[WordPress Plugin] iPad Swipe

Most WordPress themes look just fine when you view them in an iPad but what every iPad user gets very soon used is swiping across to turn pages. I thought it would be a good addition for any WordPress blog to be able to provide this functionality via a plugin and a good programming exercise for me as it would be my first WordPress plugin.

The plugin can work for all iOS devices (there is an admin setting for that) but it was essentially developed for iPad. After activating this plugin, one can swipe left/right on their iPad to see next/previous post on single post page and next/previous posts lists on listing page. This plugin uses Zepto javascript framework to attach swipe event to the page.

Installation
1. Upload directory ‘ipad-swipe’ to the ‘/wp-content/plugins/’ directory.
2. Activate the plugin through the ‘Plugins’ menu in WordPress.

Download: Click Here

Users will see a message box on home page or single post, informing them that they can use swipe to turn pages. By default visitors will see this message for 5 visits or till they just close the message box. There is a setting to change the number of times to show message on iPad Swipe settings page. Another setting is, which devices should this plugin be supporting. If “All” option is selected, it will allow to swipe posts on iPad, iPod and iPhone. Finally, the settings allows you to add your own message to be shown to the users.

Feedback, suggestions, patches, bug reports most welcome.

About Sumit Meshram

Sumit is a Senior Web Developer at SANIsoft. He has over 3 years of experience working on variety of web applications.

52 Responses to [WordPress Plugin] iPad Swipe

  1. Chantal January 17, 2011 at 6:33 pm #

    I want to use this plugin for a project. Is it possible to support swipe for pages too?

    • Sumit Meshram January 18, 2011 at 1:19 pm #

      By pages do you mean multi page posts? If so, I will try to add support for that.

      Sumit

      • Chantal January 18, 2011 at 2:01 pm #

        I am building a site right now which consists mostly of pages (not posts), but I could work around that using custom post types and use the original posts as news items.

        • Sumit Meshram January 18, 2011 at 2:30 pm #

          Well, I don’t think WordPress has a facility to navigate between the pages just like posts. So adding support for that won’t be possible. For custom post types, I will have to check what WordPress does there.

  2. Phil January 25, 2011 at 10:06 pm #

    This plugin didn’t work for me. Any suggestions?

    • Tarique Sani January 26, 2011 at 8:36 am #

      Any URL which we can look at? Also – try switching to the default theme and see if the plugin works….

  3. Phil January 26, 2011 at 10:21 am #

    Yes, the site is http://ipadhelp.com.

    It’s not worth swapping themes for. I activated the plugin and tried it on an iPad and the swiping function didn’t work. I have now deactivated the plugin.

    • Sumit Meshram January 27, 2011 at 9:28 am #

      Just wanted you to test with the default theme not change it forever. If you can’t give me a URL to test there is little that I can do to help. You can see the plugin live at http://www.tariquesani.net/blog

  4. Phil January 28, 2011 at 12:27 pm #

    Very cool feature, I tried the link on your blog and I would love to add this feature to my site.

    http://ipadhelp.com

    I reactivated the plugin and cleared the cache on my iPad and it’s still not working.

    I do use a JS & CSS script optimizer plugin on the site, I’m not sure if that is causing it not to work.

    • Tarique Sani January 28, 2011 at 12:55 pm #

      Cannot see the link to the plugin’s js and CSS file – if the plugin is still active then I am at a loss as to what could be wrong. Did the plugin work with the default Twenty20 theme?

  5. Sumit Meshram January 28, 2011 at 2:44 pm #

    Yes, this issue is happening because of JS & CSS script optimizer plugin. To solve this issue, on the settings page of script optimizer plugin, add zepto.min.js to the list of Ignore next javaScripts.

    Hope that helps.

  6. Tretlo February 6, 2011 at 12:29 am #

    Hi- I love the idea for this plugin but I visited your test site http://www.tariquesani.net/blog and I couldn’t find any swipe functionality on the mobile theme. Is your site enabled for iPad only and not iPhone etc? Thanks + keep up the great work!

  7. diederik February 9, 2011 at 3:52 am #

    Hi,
    Wonderful plugin!
    Can I somehow make it work with a template page that has a query_posts like so:

    Thanks!

  8. diederik February 9, 2011 at 5:44 am #

    Sorry, must look like a spammer, got it to work inApp (which is what I needed), not on iPad Safari… with the Query_posts, thx, great plugin!

  9. Stephen February 20, 2011 at 10:59 pm #

    Hi,

    Just installed the wordpress plugin. Thanks. It’s working well and adds a nice feature for iPAD viewing

  10. suwidadi March 2, 2011 at 1:13 pm #

    hi, i develop themes in wp and your plugins seems great, can anyone have any screenshot of this plugin on ipad ? thanks b4..

    • Tarique Sani March 2, 2011 at 4:15 pm #

      Well there actually is nothing to look at – new visitors are informed they can swipe to turn pages – that is it :-)

  11. Alex March 7, 2011 at 10:49 pm #

    Hi,

    I would like to use this plugin, but it must be possible for me to only allow scrolling between posts that are in the same category, is this possible?

    Thanks

  12. TretLo July 3, 2011 at 10:51 pm #

    Hi,
    LOVE the plugin. Working great. Any way to modify so it doesn’t work on my homepage but does work once I’m looking at a blog post?
    Thanks!
    -a

    • Sumit Meshram July 4, 2011 at 4:31 pm #

      Try modifying the condition in file ipad-swipe.php on line number 139, so that it should read as

      if (_swp_check_user_agent() && is_single()) {

      instead of

      if (_swp_check_user_agent() && (is_single() || is_home())) {

  13. TretLo July 12, 2011 at 10:03 am #

    Thanks! That did the trick!

  14. Justin August 7, 2011 at 8:58 am #

    Just what I was looking for.

    Two issues though.

    1) The box pops up but its grey on grey and cant be read. Does this have something to do with my websites font color.

    2) Is it possible to swipe only through categories?

    • Tarique Sani August 8, 2011 at 10:20 am #

      The grey on grey is controlled via CSS you can change that. Currently the plugin cannot swipe only thru categories

  15. Katrina September 2, 2011 at 12:12 pm #

    I can’t get it to work, does it only work on certain themes?

    • Tarique Sani September 4, 2011 at 9:03 am #

      It should work on almost every theme… try clearing the cache

  16. Katrina September 5, 2011 at 8:26 am #

    I have cleared my cache on my iPad, but still not working. I would really like this plugin to work, looks fantastic on other website’s I’ve seen using it. Your help is gratly appreciated!

    • Tarique Sani September 8, 2011 at 9:23 am #

      Which theme are you using? I will try and get the developer to try it out locally….

      • Katrina September 8, 2011 at 9:24 am #

        Thankyou, I use ProPhoto 3
        http://www.prophotoblogs.com/

        • Sumit Meshram September 9, 2011 at 11:54 am #

          Unfortunately ProPhoto 3 theme is not free and hence I cannot try it out.

  17. Yanki Yuksel September 8, 2011 at 9:11 am #

    I have installed this plug in. It works to some degree… When I click on the menu and select pages, the list is empty… but when I click at certain areas, it actually does open a page. Anyway to fix this?

    Regards,

    Yanki

    • Tarique Sani September 8, 2011 at 9:25 am #

      I am not sure I understand you – this plugin has nothing to do with menu, it just enables swiping pages on ipad

  18. Marianne September 20, 2011 at 1:36 pm #

    Great plugin! Works fine on my ipad. Is there a way I can get it to work on Samsung Galaxy Tab too?

    • Tarique Sani September 20, 2011 at 4:48 pm #

      Thanks, Probably won’t work on a Galaxy Tab because the JS library uses is pretty Mobile Safari specific

  19. jerry September 29, 2011 at 12:31 am #

    hola gracias por el plugin me encantaria instarlo en mi pagina para los usuarios que la visiten puedan verlo en ipad pero antes de eso queria ver la posibilidad de que manden algunos capturas de pantall en ipad para ver como se ve gracias y tambien queri saber (Sumit Meshram) si lo dela modificacion que hisiste reciente esta ya modificado en el link de descarga gracias

    • Tarique Sani September 29, 2011 at 10:34 am #

      Am sorry Jerry – none of us understands Spanish :-(

  20. jerry September 29, 2011 at 7:49 pm #

    Hi, thanks for the plugin I would love to install it on my page for users who visit can see it on iphone but before that I wanted to see the possibility that send some screenshots to see how the iphone is due and also wanted to know (Sumit Meshram) if hisiste dela recent modification which is already modified in download link, thanks

    • Tarique Sani September 30, 2011 at 5:57 pm #

      You want to see some screenshots? That much I can understand… but the second part I don’t understand.

      P.S. Yes, I did use google translate on your original comment :-)

  21. Steven October 12, 2011 at 6:45 pm #

    Hi. It would make me happy if you could develop the swipe to work on my gallery pages. I am using a slider template which is really not very functional on the ipad at the moment. It is on the following link. Please let me know if you think this is possible.

    http://stevenpearson.com

    Regards. Steven.

    • Sumit Meshram October 13, 2011 at 1:16 pm #

      Sorry Steven, I am currently busy and right now there are no plans to enhance the plugin.

  22. raha January 3, 2012 at 5:22 am #

    Works great with WP 3.3 for the blog part, but I don’t see the message warning … Any ideas ?

  23. Will May 13, 2012 at 7:50 am #

    Hi,
    Love the idea of swiping but it’s not working for me at:
    http://www.willyurman.com/AdayAphoto
    It loads page 2, 3, 4 but it just keeps reloading the same post.

    any idea what I’m doing wrong?
    thanks!
    will

    • Tarique Sani May 14, 2012 at 11:40 am #

      The theme you are using does not have standard WordPress pagination… this plugin will unfortunately will not work with it

  24. Tara June 1, 2012 at 7:52 pm #

    Is there a way to keep the posts looping? so you can just keep swiping to cycle through the posts?

    • Tarique Sani June 3, 2012 at 8:42 pm #

      Sorry no – currently there is no way to do this

  25. Roob July 8, 2012 at 3:12 pm #

    I cant get it to work. I have a front page, with a full screen slider (are posts, with just a featured image in it). But I get error ‘no more pages’

    Please help!

    • Tarique Sani July 8, 2012 at 4:37 pm #

      It does not work with custom pagintors. Your theme has to use the WordPress pagination

  26. Roob July 8, 2012 at 3:12 pm #

    Website is http://www.vandijk-hoveniers.nl/ipad

  27. Tony Voss July 21, 2012 at 12:59 pm #

    Hi… I would love to use the iPad swipe plug-in, but it is not working for me. Does it work OK
    on multi (network) sites? I have installed it at the network level and done a network activate.

    On my site blog.antipole.co.uk no banner appears.

    But if I go to the (empty) network site antipole.co.uk the banner does appear.

    Any help will be much appreciated – thanks, Tony

    • Tarique Sani July 23, 2012 at 10:14 am #

      It works only on themes which have native WP pagination

  28. Silvan April 8, 2013 at 11:01 pm #

    Hi Tarique – great plugin, i have it up and running on a test site.

    I’ve swapped the swipe movements around though, so when you swipe left you get an older article; feels more like a book or reading a newspaper.

    Shame you’re not going to rework this for Android. I’ve seen another plugin working on those devices, although it had some other issues, so I wasn’t able to use it in the end.

Trackbacks/Pingbacks

  1. iPad Swipe | Best Plugins - wordpress – widgets – plugin 2012 - October 13, 2012

    [...] More information on http://www.sanisoft.com/blog/2011/01/11/wordpress-plugin-ipad-swipe/ [...]

Leave a Reply