Home › Forums › Support › Dont display GP Hooks on mobile phone This topic has 12 replies, 3 voices, and was last updated 7 years, 2 months ago by Tom. Viewing 13 posts - 1 through 13 (of 13 total) Author Posts May 27, 2015 at 6:13 pm #110784 Philippe Is it possible to hide the php code displayed by GP Hooks for Mobile Display ? May 27, 2015 at 11:57 pm #110840 TomLead Developer Lead Developer Wrap anything you want to hide on mobile devices in a div with the class: hide-on-mobile For example: <div class="hide-on-mobile"> I won't show up on mobile </div> May 28, 2015 at 12:23 am #110855 Philippe I do not arive to operate it ? This is the code that I would like to hide on mobile : <?php if ( ! is_page( 3161 ) ) : ?> <img src="http://www.maggeek.com/wp-content/uploads/2015/05/Barre-grise1.png"> <?php endif; ?> Thank you in advance May 28, 2015 at 9:08 am #110965 TomLead Developer Lead Developer Then you would do this: <?php if ( ! is_page( 3161 ) ) : ?> <div class="hide-on-mobile"> <img src="http://www.maggeek.com/wp-content/uploads/2015/05/Barre-grise1.png" /> </div> <?php endif; ?> May 28, 2015 at 9:14 am #110974 Philippe Excellent thank so much. Good day to you 🙂 May 28, 2015 at 11:48 am #111007 TomLead Developer Lead Developer You’re welcome! You too 🙂 February 10, 2017 at 2:20 pm #277131 kieferntanne Hi Tom, please help me… How can I disable this code on mobile devices? <?php echo do_shortcode("[metaslider id=132]"); ?> The code is in the wp_head (hook). It is the slider at the top of the page. Link thx Christian February 10, 2017 at 4:30 pm #277177 TomLead Developer Lead Developer Try wrapping it in the hide-on-mobile class: <div class="hide-on-mobile"> Stuff in here is hidden on mobile </div> February 11, 2017 at 9:32 am #277420 kieferntanne Hi Tom, I think I’ve understood it, but its a shortcode or php. I can´t put it into a – right? February 11, 2017 at 9:50 am #277426 kieferntanne I Can´t put it into a <div> -right … February 11, 2017 at 8:46 pm #277604 TomLead Developer Lead Developer You can put anything into a div, even shortcodes or PHP. Let me know if that doesn’t work 🙂 February 12, 2017 at 5:49 am #277705 kieferntanne Hi Tom, many thanks for your great support. The plugin cache enabler was the problem – and I 🙁 Thank you February 12, 2017 at 10:13 am #277785 TomLead Developer Lead Developer You’re welcome 🙂 Author Posts Viewing 13 posts - 1 through 13 (of 13 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In