Use Google Material Icon Font

I would like to use Google’s icon font within my site.
Apparently, all I have to do is add this line of HTML in the HEAD section.

Can someone please explain how to do this, keeping in mind that I don’t have FTP access.

Thanks!

Hello @jmraisal,

Thanks for asking. :slight_smile:

You can use plugins like Insert Headers and Footers to add scripts in head section. https://wordpress.org/plugins/insert-headers-and-footers/

Thanks.

Thanks for your response.

I’m seeing a bunch of articles on “Enqueueing” styles and scripts in the functions.php file.

Which is better? If I were to use the Enqueue action, what would it look like?

function child_enqueue_styles() {

	// enqueue child styles

	wp_enqueue_style('material-icons', '//fonts.googleapis.com/icon?family=Material+Icons' );

}
add_action('wp_enqueue_scripts', 'child_enqueue_styles', 9999);

???

Hello @jmraisal,

Thanks for asking. :slight_smile:

Well it totally depends on you. Reason why I suggest plugin is because it’s hassle free and easy to use, setup.

However, you can also do the same using child theme and by using wp_enqueue_style function. It’s matter of personal preference and ease. If you would like to learn more about wp_enqueue_style function, please take a look at following resource:

https://developer.wordpress.org/reference/functions/wp_enqueue_style/

I suggest you to please setup child theme before making any core changes. Here are the resources that can be used to download and instructions on setting up child theme:

https://theme.co/apex/child-themes

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.