Title: Functions Code Example
Last modified: August 21, 2016

---

# Functions Code Example

 *  [Victor Noyes](https://wordpress.org/support/users/fla0/)
 * (@fla0)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/functions-code-example/)
 * If I’m reading this correctly you can add functions that will automate the mobile
   detection. Could you please give an example of the functions code to be placed
   in the themes functions.php file?
 * [http://wordpress.org/plugins/wp-mobile-detect/](http://wordpress.org/plugins/wp-mobile-detect/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [JulieMarie](https://wordpress.org/support/users/juliemarie/)
 * (@juliemarie)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/functions-code-example/#post-4384164)
 * i too would like an example of how to use wpmd_is_ to block a plugin
 *  [Chris](https://wordpress.org/support/users/lamordnt/)
 * (@lamordnt)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/functions-code-example/#post-4384170)
 * You have to wrap what you want to hide in a functions snippet. I am not too handy
   with php but this is what is working for me:
 *     ```
       <?php if (function_exists('wpmd_is_phone') && wpmd_is_phone()) :?>
       This will show if there is a phone
        <?php else : ?>
       This will show if it is anything but a phone
        <?php endif; ?>
       ```
   
 * Hope that helps!
 *  [RB001](https://wordpress.org/support/users/rb001/)
 * (@rb001)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/functions-code-example/#post-4384178)
 * It did, thanks.
 *  [jencardwell](https://wordpress.org/support/users/jencardwell/)
 * (@jencardwell)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/functions-code-example/#post-4384179)
 * I have been looking at this plugin for awhile and I just don’t know enough to
   know how to use it. The example above doesn’t help. I wish it did.
    I would like
   to hide the flash banner in my header.php file on all mobile devices. I am not
   sure how to use the functions and/or short codes to do that.
 * Can anyone give me any information that will help? I will post code as needed.
   I just didn’t want to do it needlessly.
 * Thanks for any information.
 *  [samenezes](https://wordpress.org/support/users/samenezes/)
 * (@samenezes)
 * [12 years ago](https://wordpress.org/support/topic/functions-code-example/#post-4384183)
 * That is it, Chris.
 * I had a problem with a bar named wp-SuperSized with small MOBILES screens;
    (
   resumo em brasileiro / português, ao final).
 * **Problem:** The bar DON’T stay on bottom, anytime, as expected.
 * **SOLUTION:**
    I will exclude mobiles, for now!
 * At wp-supersized/index.php — before the block begining with “include_once(….”,
   do:
 *     ```
       if ( !wpmd_is_device() )
       {
       ************************************
       ******* ORIGINAL BLOCK ******
       ******* OF CODES **************
       }
       ```
   
 * __________________________
    So, the NOT “!” include desktop only; Exclude all‘
   devices’ (as example).
 * That is all.
    Artur Sá Menezes ============================== samenezes.wordpress.
   com
 * **Português, brasileiro:**
    Implementação de IF no arquivo wp-supersized/index.
   php, funciona perfeitamente, EXCLUINDO os mobiles da exibição deste wp-SuperSized,
   mas somente depois de instalado o plug-in [https://wordpress.org/plugins/wp-mobile-detect](https://wordpress.org/plugins/wp-mobile-detect),
   vide /faq/ também — depois, vou ver se incluo os iPads e tablets maiores…
 * Fácil de testar, se você tiver o Forefox e mudar o “Browser Agent” para um iPhone,
   por exemplo. A barra desaparece.
 * Só isso
    😀

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Functions Code Example’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-mobile-detect.svg)
 * [WP Mobile Detect](https://wordpress.org/plugins/wp-mobile-detect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-mobile-detect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-mobile-detect/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-mobile-detect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-mobile-detect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-mobile-detect/reviews/)

 * 5 replies
 * 6 participants
 * Last reply from: [samenezes](https://wordpress.org/support/users/samenezes/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/functions-code-example/#post-4384183)
 * Status: not resolved