FontAwesome 5 linked via Functions file is not working?

Hi, I am trying to add FontAwesome to X theme Pro. I want to target icons via CSS.

I already read this: https://sridharkatakam.com/load-font-awesome-5-wordpress/

But for some reason it did not work for me. I tried both pro and free since I bought pro, but still nothing works.

I added this to my functions.php, trying the Free version:

	function load_script() {	
	wp_enqueue_script( 'font-awesome-free', '//use.fontawesome.com/releases/v5.2.0/css/all.css');
}

	add_action( 'wp_enqueue_scripts', 'custom_load_font_awesome' );

But that did not work, I also tried Pro:

 	function custom_load_font_awesome() {

 		wp_enqueue_style( 'font-awesome-pro', '//pro.fontawesome.com/releases/v5.2.0/css/all.css' );

 	}

and I have this on my CSS to target a class, but it is still only showing up as an empty box:

a.caseLink::before {
    content: "\f35d";
    font-family: "Font Awesome 5 Pro";
  font-weight: 400;

I also cleared my Cache, so that is not whats causing the issue. I am not sure what I am doing wrong ?

Hey @ianizaguirre,

Font Awesome 5 is already integrated in the latest version of X and Pro. See the icons related items in the FAQ section in our latest Release Note. With that said, you should use the system in the theme for free icons.

For Font Awesome Pro, please check the source code of your site’s front-end to see if your Font Awesome Pro’s URL is outputted. If it’s not outputted then the issue most probably is in your code. If it’s outputted, the issue could be in the URL you’re using. In which case, you should contact Font Awesome support.

Thanks.

You were right, I reached out to Font Awesome support and it was a link issue. It fixed it. Thank you

You are most welcome!
Glad that you got it fixed.

Thanks

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