How to Fix Font-Weight Not Applying To Widget Titles?

How to Fix Font-Weight Not Applying To Widget Titles?

Previously, font-weight for widgets (all sidebar, footer, header) titles was applied only as 「normal」 no matter the weight set for the headings, even though this is a heading pattern.

With Astra Theme update 3.6.0, this issue was fixed, and now the heading settings are being appropriately applied to widget titles too.

If this improvement is not applied automatically to your website, this document will help you fix this.

Why Do I Need This Improvement?

So far, if you wanted to set your widget titles weight, you needed to add some custom CSS for this. 

Now this can be done from Customizer (Global Settings > Typography > Headings) by setting the weight for the appropriate heading type with these improvements. 

How To Fix This?

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

For the old users, this improvement needs to be activated by adding a filter. This was done to avoid any potential issues with existing websites, which could have appeared in some cases if these improvements would have been applied automatically. 

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_heading_fonts_typo_support', '__return_true' );

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

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注