Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1245074
    Varnsen
    Participant

    X: 4.6.2
    CornerStone: 1.3.3

    Hey Theme.co, got a question. I’m looking for a way to hide a certain element only on mobiles as it messes up the header when viewed on a smaller device.

    I’m running X child theme, and I edited _brand.php to the following:

    <a href="<?php echo home_url( '/' ); ?>" class="<?php x_brand_class(); ?>" title="<?php echo $site_description; ?>">
      <?php echo ( $logo == '' ) ? $site_name : $site_logo; ?>
    </a>
    
    <div class="more-content">
    
        Content I'd like to hide on mobile here
    
    </div>
    

    Is there any way I can do this?

    Hopefully you’re able to help!

    Thanks

    #1245139
    Thai
    Moderator

    Hi There,

    Please add the following CSS under Customizer > Custom > Global CSS:

    @media (max-width: 767px){
    	.more-content {
    		display: none;
    	}
    }

    Hope it helps 🙂

  • <script> jQuery(function($){ $("#no-reply-1245074 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>