Hide the Text by Setting the Font Size to Zero
|
/ Documentation /Custom Code Snippets/Astra Theme & Pro Filters/ Hide the Text by Setting the Font Size to Zero

Hide the Text by Setting the Font Size to Zero

Designing your website to look and work perfectly on all screen sizes is more important now than ever. Sometimes it’s not so easy to do this. If sometimes you would like to hide some text or labels on any screen, you’ll be able to do this by setting font size to zero.

This document will help you do this with the Astra Theme.

Why Is This Important?

This improvement came with the Astra Theme 3.6.9 update. In earlier versions of the Astra Theme setting the font size to zero was not possible.

This will ultimately help you with responsive design.

How To Change This?

For all new websites, these changes will be applied automatically. 

For the existing websites, this improvement needs to be activated by adding a filter. This was done to allow you to check how these changes apply to your website and make any changes if needed. 

To enable this improvement, you need to add the following custom code (filter) to the functions.php file of your Child Theme:

add_filter( 'astra_zero_font_size_case', '__return_true' );

If you don’t have your Child Theme installed, please check this article on how to do it. 
If you are not sure how to add this code, please check this article.

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
On this page

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.

This field is required.

REWIND

YEAR IN REVIEW

Scroll to Top
Now choose your preferred
page builder addon
Choose your preferred page builder addon

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.

Download Free Astra Theme - Modal Popup Form