Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is there a Wordpress plugin out there, that redirects only Blackberry visitors to a very simple basic something of the site?

Currently I have a responsive website, a long vertical one with smoothscroll.js (Similar to the Nike one). It responds in iOS, Android, and iPad - and while it displays alright in BB (curve 2009), its very hard to read text. I have to support curve 2009 + BB.

Any suggestions?

share|improve this question

closed as off-topic by Pieter Goosen, Mark Kaplun, birgire, gmazzap, cybmeta Dec 9 '14 at 11:29

This question appears to be off-topic. The users who voted to close gave these specific reasons:

If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

up vote 1 down vote accepted

There isn't one that I know off, however if you wanted to write a script to solve your problem then:

In Javascript:

<script type="text/javascript">   
   var userBrowser = navigator.userAgent;
   var url = "";
   if (userBrowser.indexOf("BlackBerry") >= 0)
      if (userBrowser.indexOf("WebKit") >= 0)
         window.location = url;

or alternatively you could be smart and try and create a plugin. In php, I'd imagine it would have something along the lines of:

   $userBrowser = strtolower($_SERVER['HTTP_USER_AGENT']);
   $blackberry = strrpos($userBrowser, "blackberry");
   $webkit = strrpos($userBrowser, "webkit");
   $url = "";

   if (!($pos_blackberry === false))
      if (!($pos_webkit === false))
         header("Location: " . $url);

Hope that helps

share|improve this answer
This seems like a good suggestion, I'll give it a go - thanks! – YourConscious Feb 15 '12 at 14:14

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