- This topic has 12 replies, 3 voices, and was last updated 5 years, 3 months ago by
Tom.
-
AuthorPosts
-
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 #110840Tom
Lead DeveloperLead DeveloperWrap 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>
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentMay 28, 2015 at 12:23 am #110855Philippe
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 #110965Tom
Lead DeveloperLead DeveloperThen 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; ?>
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentMay 28, 2015 at 9:14 am #110974Philippe
Excellent thank so much.
Good day to you 🙂
May 28, 2015 at 11:48 am #111007Tom
Lead DeveloperLead DeveloperYou’re welcome! You too 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentFebruary 10, 2017 at 2:20 pm #277131kieferntanne
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.
Linkthx
ChristianFebruary 10, 2017 at 4:30 pm #277177Tom
Lead DeveloperLead DeveloperTry wrapping it in the hide-on-mobile class:
<div class="hide-on-mobile"> Stuff in here is hidden on mobile </div>
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentFebruary 11, 2017 at 9:32 am #277420kieferntanne
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 #277426kieferntanne
I Can´t put it into a
<div>
-right …February 11, 2017 at 8:46 pm #277604Tom
Lead DeveloperLead DeveloperYou can put anything into a div, even shortcodes or PHP.
Let me know if that doesn’t work 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentFebruary 12, 2017 at 5:49 am #277705kieferntanne
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 #277785Tom
Lead DeveloperLead DeveloperYou’re welcome 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.