No results found. Try again with different words?

Search must be at least 3 characters.

How To Apply New Default Button Padding Values?

Sidebar Image

Did not find a solution? We are here to help you succeed.

Astra Theme version 3.6.3 brought changes to default padding values for buttons to improve the default UI. Furthermore, this update came with the fix for Global padding settings not being applied to Gutenberg buttons. 

Why Do I Need This Improvement?

Previously, the theme default button padding values were 10px on top and bottom and 40px on the left and right sides. These settings negatively influenced the visual appeal of the buttons as they made buttons too wide.

Astra Theme - Old Default Button Padding Settings

That’s why we updated these values to 15-30px (top, bottom – right, left).

Astra Theme - New Default Button Padding Settings

Also, if you used Gutenberg for your posts or pages, you might have noticed that the button padding values you set at Customizer > Global > Buttons didnโ€™t apply and that you needed to set these values manually for each button.

Though these things were changed with Astra 3.6.3 update, this wonโ€™t be applied automatically to your website to avoid any adverse effects on your existing websites.

How To Fix This?

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

As mentioned, for the existing website, 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 apply the improvement to your existing website, you would need to add a filter to the functions.php file of your Child Theme. If you donโ€™t have your Child Theme installed, please check this article on how to do it. Please add the following filter:

add_filter( 'astra_update_button_padding_defaults', '__return_true' );

If you are not sure how to add this code, please check this article.

Was this article helpful?
Sidebar Image

Did not find a solution? We are here to help you succeed.

Related Docs

Join 1,653,898+ Happy Site Owners Using Astra

Whether you are a beginner, small business owner, or professional web developer, Astra provides all the tools you need to easily build your beautiful WordPress website.

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