Title: Usage
Last modified: May 16, 2019

---

# Usage

 *  Resolved [mikeydiamonds](https://wordpress.org/support/users/mikeydiamonds/)
 * (@mikeydiamonds)
 * [7 years ago](https://wordpress.org/support/topic/usage-30/)
 * Just a quick question on how to use this awesome plugin.
 * Are all the methods from the Mobile Detect PHP library available:
    $detect->isMobile();
   $detect->isTablet(); $detect->isIphone(); $detect->isSamsung();
 * How do you include in a template file. obviously this won’t work:
    require_once‘
   Mobile_Detect.php’; $detect = new Mobile_Detect;

Viewing 1 replies (of 1 total)

 *  Plugin Author [Pothi Kalimuthu](https://wordpress.org/support/users/pothi/)
 * (@pothi)
 * [7 years ago](https://wordpress.org/support/topic/usage-30/#post-11539201)
 * While the plugin was originally developed to modify the core `wp_is_mobile` function,
   it is possible to use all the methods from the core MobileDetect PHP library.
 * You may use something like the following code…
 *     ```
       $detect = new TinyWP_Mobile_Detect;
       if ($detect->isMobile()) {
         # do stuff for mobile visitors
       }
       ```
   
 * These days, certain paid themes and (free / paid) plugins include MobileDetect
   PHP library on their own. In order to avoid the naming scheme conflict* with 
   those, the library has been renamed to TinyWP_Mobile_Detect.
 * Thanks.
    -  This reply was modified 7 years ago by [Pothi Kalimuthu](https://wordpress.org/support/users/pothi/).
      Reason: fix typo
    -  This reply was modified 7 years ago by [Pothi Kalimuthu](https://wordpress.org/support/users/pothi/).
      Reason: fix formatting of code block

Viewing 1 replies (of 1 total)

The topic ‘Usage’ is closed to new replies.

 * ![](https://ps.w.org/tinywp-mobile-detect/assets/icon-128x128.png?rev=1784200)
 * [Mobile Detect](https://wordpress.org/plugins/tinywp-mobile-detect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tinywp-mobile-detect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tinywp-mobile-detect/)
 * [Active Topics](https://wordpress.org/support/plugin/tinywp-mobile-detect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tinywp-mobile-detect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tinywp-mobile-detect/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Pothi Kalimuthu](https://wordpress.org/support/users/pothi/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/usage-30/#post-11539201)
 * Status: resolved