Preload icons in mobile-theme.woff?

Posted in: Newspaper
Post count: 361

How can I preload the icons in the mobile-theme.woff? Can I find them in the style.css?

Greatings Kathrin

Post count: 623

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!

Post count: 361

Thank you for the input. @Amit should the code added to the following directory:

/wordpress/wp-content/plugins/td-composer/mobile

Greetings Kathrin

Post count: 623

My pleasure!
Yes, that’s the correct directory path.

Post count: 361

@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

Post count: 623

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.

Post count: 361

@amit I think it works 🙂

Thank you very much 🙂

Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic.