Site logo

Archived topic

Best method to hide output for mobile?

3 replies · Started by George on October 26, 2020

Viewing posts 1–4 of 4

New GeneratePress Premium user here :)

I am using a modified snippet that was provided on this forum to add rt_reading_time shortcode to right after the author display.


add_filter( 'generate_post_author_output', function( $output ) {
    return $output . do_shortcode( '[rt_reading_time label="               Reading Time:" postfix="minutes " postfix_singular="minute "]' );
} );

The resulting HTML is


<span class="span-reading-time rt-reading-time"><span class="rt-label rt-prefix">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reading Time:</span> <span class="rt-time"> 30</span> <span class="rt-label rt-postfix">minutes </span></span>

So what is the best way to hide this only for mobile visitors ? Does GeneratePress have inbuilt class for this?

thanks

George

Cheers Leo thanks for the welcome and pointer !

No problem :)

This archived topic is closed to new replies.