I admit it, I really like the Astra theme, I use it right here on the blog, and I always recommend it to everyone, because it is a light and powerful theme, with all the most recommended settings for any type of web, even in its free version, but it has some things that I don’t understand.
I mean its update policy, which is weird, being generous.
For example, version 3.3 of Astra has just been released, both the theme and the Pro extension, which incorporates fantastic improvements that affect, above all, the loading speed and resource optimization. Fantastic, isn’t it?
Well no, it turns out that you can only enjoy these new features if you install Astra from scratch, as a new user. If you already had Astra and you upgrade, none of these performance improvements will be activated.
The argument? That you may have custom HTML and CSS and the changes could negatively affect the look and feel of your site.
Ok, that may be reasonable, but doesn’t that always happen with any update? isn’t it the webmaster’s responsibility to check if the updates work fine and if not, to restore to the previous version and analyze the errors?
Well… Astra developers have a policy whereby, no matter the update, if you want to incorporate the new features you have to add an additional code to the functions.php file of the Astra child theme.
For example, version 3.3 of Astra replaces the use of the astra.woff font, the only one that loaded by default, with vector icons, something that reduces the page load by more than 12%. But it turns out that if you update Astra nothing happens, you continue with the Astra font, to replace the icons with SVG you have to add a code, this one:
add_filter( 'astra_is_svg_icons', '__return_true' );
Code language: JavaScript (javascript)
Another optimization of this version, which reduces HTML weight and optimizes CSS using Flex, also requires upgraders to add code:
add_filter( 'astra_apply_flex_based_css', '__return_true' );
Code language: JavaScript (javascript)
However, if you install and activate Astra from scratch all these improvements will be available directly.
Well, I don’t understand it.
Hi. Do you know if either of these filters are still required? I have been searching about this… I saw posts from official support/devs saying that the flex_based_css snippet is only a temporary workaround, and that we should remove the snippet once the issue is fixed in a theme update. The posts were from 2+ weeks ago and there was a theme update, but… I’d like to know if we can/should remove that filter now.
Yes, we asked the Astra team and every new fix added in new versions should be added to the functions.php, they aren’t cumulative in new versions, except for new installs.
Thanks. It’s definitely weird, just like you said. I’m sure most site owners rarely (if ever) will do a fresh install after their site is established… not for every theme update. And the funny thing is, an update broke the sticky header on one of my Astra sites (but not others) so their argument about breaking/changing things with an update doesn’t make much sense to me.