@jazir5 thank you for the suggestion! Deciding the pages where the fonts will be preloaded is not available in the plugin’s settings as the feature is meant to preload fonts that are loaded site-wide. However, if you edit your functions.php (within the theme), you can use the filter ‘wpacu_preload_local_font_files_output’, based on various conditions (e.g. if the page is an Elementor one) via add_filter()
function. Here’s an example:
add_filter('wpacu_preload_local_font_files_output', function ($preload_tag_output) {
global $post;
// You can do extra checkings here (e.g. to make sure Elementor is activated to avoid any PHP errros if the class is not found, etc.)
$is_elementor_page = \Elementor\Plugin::$instance->db->is_built_with_elementor($post->ID);
if ($is_elementor_page) {
return $preload_tag_output;
}
// Not an Elementor page, return an empty value (nothing to print)
return '';
});
I hope it gives you an idea of the implementation. Let me know if I can further assist you at your earliest convenience! Happy winter holidays!