WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. John
    Member
    Posted 8 months 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 8 months 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.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.