Site logo

Archived topic

Dont display GP Hooks on mobile phone

12 replies · Started by Philippe on May 27, 2015

Viewing posts 1–13 of 13

Is it possible to hide the php code displayed by GP Hooks for Mobile Display ?

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>

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

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; ?>

Excellent thank so much.

Good day to you :)

You're welcome! You too :)

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

Try wrapping it in the hide-on-mobile class:

<div class="hide-on-mobile">
    Stuff in here is hidden on mobile
</div>

Hi Tom,

I think I've understood it, but its a shortcode or php.
I can´t put it into a

- right?

I Can´t put it into a <div> -right ...

You can put anything into a div, even shortcodes or PHP.

Let me know if that doesn't work :)

Hi Tom,
many thanks for your great support.
The plugin cache enabler was the problem - and I :-(

Thank you

You're welcome :)

This archived topic is closed to new replies.