[Resolved] Best method to hide output for mobile?

Home Forums Support [Resolved] Best method to hide output for mobile?

Home Forums Support Best method to hide output for mobile?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1505530
    George

    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

    #1505531
    Leo
    Staff
    Customer Support

    Hi there,

    Welcome to GP!

    I believe this is what you are looking for:
    https://docs.generatepress.com/article/responsive-display/#using-our-hide-on-classes

    #1505534
    George

    Cheers Leo thanks for the welcome and pointer !

    #1505538
    Leo
    Staff
    Customer Support

    No problem ๐Ÿ™‚

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.