WordPress.org

Forums

Jetpack by WordPress.com
[resolved] Mobile redirect? (2 posts)

  1. John
    Member
    Posted 1 year ago #

    Hello, I was wondering if it is possible through Jetpack to redirect just one of my WordPress pages for mobile users, and hopefully at the same time have the list of mobile users it detects auto-update (since the list of mobile devices grows everyday).

    If it isn't possible, do you have any specific suggestions for me that might help (for example, not just advising me to check the WordPress forums, but actual plugin, code, etc. suggestions).

    Thanks!

    http://wordpress.org/plugins/jetpack/

  2. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Jetpack doesn't include such an option, but you could use one of the classes provided with Jetpack to build your own small plugin.

    Here is the class we use to check for mobile devices when someone visits your site:
    http://plugins.trac.wordpress.org/browser/jetpack/tags/2.5/class.jetpack-user-agent.php
    And here is how we use this class in the mobile theme:
    http://plugins.trac.wordpress.org/browser/jetpack/tags/2.5/modules/minileven/minileven.php#L30

    I believe you could use conditional tags to check if you're on a specific page and on mobile, and then serve the mobile theme.

    I hope this helps.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Jetpack by WordPress.com
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.