How can I preload the icons in the mobile-theme.woff? Can I find them in the style.css?
Greatings Kathrin
Hi,
You can preload mobile theme fonts by adding the following code to mobile theme’s functions.php file.
// Preload Newspaper fonts for mobile theme
function dns_prefetch_mobile() {
echo "<link href='https://www.YOURDOMAIN.com/wp-content/plugins/td-composer/mobile/images/icons/mobile-theme.woff?10' rel='preload' as='font' type='font/woff' crossorigin>";
}
add_action( 'wp_head', 'dns_prefetch_mobile', 0 );
I hope you will find this helpful.
Have a great day!
Thank you for the input. @Amit should the code added to the following directory:
/wordpress/wp-content/plugins/td-composer/mobile
Greetings Kathrin
@Amit thanks it works perfectly!
Maybe you can also help me with this topic: in your guide speed up newspaper theme you say that the multipurpose style should be deactivated in the mobile theme:
// Remove Multi Purpose Style
add_action( ‘wp_enqueue_scripts’, ‘infophilic_remove_multi_purpose’, 20 );
function infophilic_remove_multi_purpose() {
wp_dequeue_style( ‘td-plugin-multi-purpose’ );
}
I have installed the mobile theme and see the multi purpose style in the theme panel, can I deactivate nevertheless?
Greetings Kathrin
Glad I was able to help.
td-composer plugin ads multi-purpose style by defaults in both responsive and mobile theme. If you are using a mobile theme you can remove multi-purpose style from the mobile theme by adding about code to the mobile theme’s functions.php file.
Let me know the results.
@amit I think it works 🙂
Thank you very much 🙂
