Title: Problem with multiple &quot;if statement&quot;
Last modified: August 30, 2016

---

# Problem with multiple "if statement"

 *  Resolved [anymvs](https://wordpress.org/support/users/anymvs/)
 * (@anymvs)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/problem-with-multiple-if-statement/)
 * Hello,
 * I’m using this plugin in my custom theme and I can’t make it work in a multiple“
   if statement”… any ideas ?
 *     ```
       <?php if(is_mobile() || is_tablet() || is_iphone($version)) {
       	get_header('customheader');
       get_template_part('mobile-page',get_post_format());
        }else{?><?php get_header(); ?> 
   
       //*
       Code for index.php
       *//
   
       }
       ```
   
 * Is working only for mobile, table and iphone function seems dead !
 * Thank you !!
 * [https://wordpress.org/plugins/php-browser-detection/](https://wordpress.org/plugins/php-browser-detection/)

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

 *  Plugin Author [Mindshare Labs, Inc.](https://wordpress.org/support/users/mindshare/)
 * (@mindshare)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/problem-with-multiple-if-statement/#post-6272317)
 * You don’t need to use all of those statements.. is_mobile() || is_tablet() are
   sufficient.
 *  Thread Starter [anymvs](https://wordpress.org/support/users/anymvs/)
 * (@anymvs)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/problem-with-multiple-if-statement/#post-6272336)
 * Thank you so much for your reply !
 * I think the problem is with the function is_tablet() because I have already used
   what you say… I also post a simple echo ‘hello’; just see how is responding and
   again is working only for mobiles…
 * Which devices are supported by the function is_table ? Because I believe that’s
   only for iPad etc
 * I’m testing things in Samsung Galaxy tab!
 * Thank you again for your respond!
 *  Plugin Author [Mindshare Labs, Inc.](https://wordpress.org/support/users/mindshare/)
 * (@mindshare)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/problem-with-multiple-if-statement/#post-6272342)
 * Can you post a link to the page?
 *  Thread Starter [anymvs](https://wordpress.org/support/users/anymvs/)
 * (@anymvs)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/problem-with-multiple-if-statement/#post-6272360)
 * It’s in my localhost I didn’t finished the theme yet ! Would you like to make
   the updates to the main site and send you the link ?
 * I try more simpler code:
 *     ```
       <?php if(is_tablet()) {
       get_template_part('mobile-page',get_post_format());
        } ?>
       ```
   
 * No results !
 *  Thread Starter [anymvs](https://wordpress.org/support/users/anymvs/)
 * (@anymvs)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/problem-with-multiple-if-statement/#post-6272392)
 * Hi 🙂 Thank you for your help ! 🙂
 * Problem solved !
 * The problem was in my [@media](https://wordpress.org/support/users/media/) css
   style-sheet. I made a mistake and set media screen for table devices and that
   didn’t liked by your plugin :p
 * Sorry about that my bad 🙂

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

The topic ‘Problem with multiple "if statement"’ is closed to new replies.

 * ![](https://ps.w.org/php-browser-detection/assets/icon-256x256.png?rev=999338)
 * [PHP Browser Detection](https://wordpress.org/plugins/php-browser-detection/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/php-browser-detection/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/php-browser-detection/)
 * [Active Topics](https://wordpress.org/support/plugin/php-browser-detection/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/php-browser-detection/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/php-browser-detection/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [anymvs](https://wordpress.org/support/users/anymvs/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/problem-with-multiple-if-statement/#post-6272392)
 * Status: resolved