Fix Swap Sections Not Working on Mobile (Old Astra Header)

Fix Swap Sections Not Working on Mobile (Old Astra Header)

Astra』s old header provides some additional options for mobile header editing with Astra Pro, one of them being Swap Sections. If it happens that this option is not working on your website, this document will help you fix it.

Astra Pro Addon version 3.5.7 corrects this, but the fix is not applied automatically to existing websites. Learn how to apply it to your website.

Why Do I Need This Improvement?

The Swap Section feature is available for the Above and Below headers with a two-section layout. The feature allows the headers sections to swap places on mobile viewport if needed.  

If you have this option activated, you might have noticed that the feature is not giving the desired result. If this is the case, the Astra Pro version 3.5.7 comes with the solution for this.

Though Astra Pro 3.5.7 update fixes this issue, it won』t be applied automatically to your website to avoid unwanted effects on your existing websites.

How To Fix This?

For all new websites, this fix will be applied automatically when you update the plugin (Astra Pro). 

As mentioned, for the existing website, this improvement needs to be activated by adding a filter after updating the plugin. 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_apply_swap_mobile_header_sections_css', '__return_true' );

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

发表回复

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