Performance

Permalink General

The following options can be found in the menu
Appearance -> Customize -> General Settings -> Additional settings.

Depending on your setup, these options can help to improve your page speed.

Permalink CSS and Javascript loading behavior

By default, all of Atomion’s CSS rules are combined and loaded as a single CSS file. The same is valid for all javascripts.

It may be more convenient for your setup to load several smaller files instead of a single large file.

You can do this by unchecking the “Use combined CSS files” and “Use combined JS files” options.

If you set it this way, the following CSS files will be loaded under the following conditions:

file condition
main.css is always loaded
general.css is always loaded
content.css is always loaded
blocks.css is always loaded, is used for the display of the blocks
slick.css is always loaded, is used for the display of the sliders
compatibilities.css is always loaded
fonts.css is loaded if Poppins or Source Sans is set as font in the Customizer
woocommerce.css is loaded when WooCommerce is activated
mp-products.css is loaded when one or more of the following plugins are activated: B2B Market, Cookie Cracker, German Market, Salesman
preloader-style-1.css is loaded when the preloader is activated in the Customizer and the 1st style is used
preloader-style-2.css is loaded when the preloader is activated in the Customizer and the 2nd style is used
preloader-style-3.css is loaded when the preloader is activated in the Customizer and the 3rd style is used
preloader-style-4.css is loaded when the preloader is activated in the Customizer and the 4th style is used
top-bar.css is loaded when the Top Bar is activated in the Customizer
search-lightbox.css is loaded if the search in the header is activated in the Customizer and “Lightbox” is selected as style
shariff.css is loaded when at least one share button is activated in the Customizer
wishlist.css is loaded when WooCommerce is activated and the wishlist has been activated in the Customizer

Regardless of the selected setting, the font-awesome.css file is always loaded as a single file and is required for the display of the icons.

For javascripts the following table is valid:

file condition
main.js is always loaded
sliders.js is always loaded, is used for the display of the sliders
compatibilities.js is always loaded
woocommerce.js is loaded when WooCommerce is activated
top-bar.js is loaded when the Top Bar is activated in the Customizer
search.js is loaded if the search in the header is activated in the Customizer
shariff.js is loaded when at least one share button is activated in the Customizer
wishlist.js is loaded when WooCommerce is activated and the wishlist has been activated in the Customizer
product-per-page.js is loaded when “WooCommerce Products per Page” is activated in the WooCommerce settings and you are on a product overview page

Permalink Filter atomion_scripts_styles

With the filter atomion_scripts_styles you can additional modify the loading of the CSS and Javascript files.

We show the usage here with some examples:

add_filter('atomion_scripts_styles', function($assets) {
    // e.g. removing blocks.css
    unset($assets['css']['blocks']);
 
    // e.g. load shariff.css only on product pages
   if ( ! is_product() ) {
        $assets['css']['shariff']['active'] = false;
   }
 
   return $assets;
});
add_filter('atomion_scripts_styles', function($assets) {
    // e.g. removing compatibilities.js
    unset($assets['js']['compatibilities']);
 
    // e.g. load sliders.js only on product pages and place in head
   if ( ! is_product() ) {
        $assets['js']['sliders']['active'] = false;
        $assets['js']['sliders']['footer'] = false;
   }
 
   return $assets;
});

The following attributes can be passed:

attribute value
active boolean true | false
src string PathToFile.css
deps array Dependencies
footer boolean true | false (load in footer or in head)
ver string|boolean|null versionnumber

Permalink Modify loading of individual files with plugin

If you are not familiar with the use of filters in WordPress, you can use a plugin like “Asset CleanUp” instead, e.g. to specify per page which CSS and / or Javascript files should be loaded.

Permalink Dynamic CSS

By default, the CSS rules resulting from the settings in the Customizer are loaded via admin-ajax.

If you find that your admin-ajax is generally very large and takes a long time to load, you can enable the option “Output dynamic CSS inline” to reduce Atomion’s impact on the admin-ajax and have the CSS statements output directly to the head area instead.

If you have activated the option, then change settings in the Customizer afterwards and these changes are not visible in the frontend, you should regenerate the inline CSS once by clicking on the button “Regenerate dynamic CSS” to make the changes effective.

Please note that not only themes affect the size and load speed of admin-ajax, but also almost all activated plugins.