I've got a this site Casarão Amneo Reseda, that has 2 themes, the main one for any desktop browser and a second one, mobie friendly, based on the jQuery mobile framework.

I'm currently using the WPtap Mobile Detector plugin to redirect any mobile browser to the mobile theme. It works just fine on iphone 3/4, samsung android, sony xperia and ipad (that was just for testing, it currently loads the desktop theme).

But the bug comes when i test with a Blackberry Bold 9700. The phone loads the normal theme. Which sould not.

In the admin of the plugin, there's already a Blackberry Storm registered as one of the devices with a mobile agent that goes like this blackberry9500|blackberry9530. Not having a Storm with me, i tried to add a new device for my Bold. So i added another blackberry device with the user agent blackberry9700, a guess rather than a real device-agent that i found. Didnt work. So i tried to add a 'global' blackberry agent: blackberry|Blackberry. Without luck too.

So i then looked for other solutions.

  1. I've tried mobilepress, but i only managed to get it load my mobile theme for iphone, not blackberry, android and sony xperia.

  2. Then, i went for the WordPress Mobile Pack plugin. I got to get the defualt themes to work on iphone and not on blackberry. I couldn't get my mobile theme to load, even on iphone.

  3. Then i looked at WPTouch. This is not a good solution either as i doesn't load my custom theme, but one of its own. And it didn't load either the mobile theme on blackberry...

So am getting really annoyed with this Blackberry problem and wonder if there is any way to get my custom mobile theme to load?


5 Answers 5


I've been using Chris Schuld's Browser Class with very good results detecting a variety of data from the browser agent.

Example of use

$browser_check = new Browser();
$browser = $browser_check->getBrowser();
function browser_check($what) {
    global $browser;
    switch ($what) {
        case 'ie':
            if ($browser==Browser::BROWSER_IE) return true;
            else return false;
        case 'bb':
            if ($browser==Browser::BROWSER_BLACKBERRY) return true;
            else return false;          
            return false;
if(browser_check('bb')) echo "Is using BlackBerry";
  • Will give it a try. I already tested the php mobile detect: code.google.com/p/php-mobile-detect but without luck so far. Admitting i could get it right, i'd then have to get this to load the mobile theme...
    – kevin
    Commented Mar 19, 2012 at 15:37
  • Just tested with a simple: require_once('lib/Browser.php'); $browser = new Browser(); if( $browser->getBrowser() == Browser::BROWSER_IPHONE ) { echo 'BROWSER_IPHONE'; } elseif ($browser->getBrowser() == Browser::BROWSER_CHROME) { echo 'BROWSER_CHROME'; } elseif ($browser->getBrowser() == Browser::BROWSER_BLACKBERRY) { echo 'BROWSER_BLACKBERRY'; } Works fine for chrome and the iPhone but not for the blackberry i'm using. Kinda weird.
    – kevin
    Commented Mar 19, 2012 at 18:08

I suggested to see my project Apache Mobile Filter is very simple to install and to use, is the ideal solution for redirect mobile devices. The project is open source and the most important completely free.

The official site is:


For redirect mobile device to the right content look this:


Let me know your opinion.


The only way i found was to update the Blackberry itself as no script at all could help the bb's browser that it actually was a Blackberry. Changed os from 5 to 6 and all works fine now.

In the end it's not a real 100% solution has the Bold wouldn't load the mobile version in its os 5 but it seemed that it couldnt load anything at all.


The plugins you've used are probably the best WP Plugins built for its purpose. But if you want to get a more reliable and robust solution to your website detection and redirection I suggest you try out Handset Detection's service. HD have a very simple system that works great and a wide variety of options that would suit every web developer's needs. And if you are looking for a database of the latest mobile device, consoles, or tablets, I think handset has the edge against the others.


Try visiting this page from your mobile: http://whatsmyuseragent.com/

or visit this page on WURFL http://www.tera-wurfl.com/explore/?action=wurfl_id&id=blackberry9700_ver1

the useragent for that particular BB should be browser_blackberry_5_0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.