Last active
September 24, 2018 14:19
-
-
Save DavidPeralvarez/549759c709b745e5a3cef69234dbbc76 to your computer and use it in GitHub Desktop.
Cómo insertar Font Awesome v5 en WordPress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* estilos generales */ | |
.icon::before { | |
display: inline-block; | |
font-style: normal; | |
font-variant: normal; | |
text-rendering: auto; | |
-webkit-font-smoothing: antialiased; | |
} | |
/* estilos de la versión 5, mostrando el icono de facebook */ | |
.icono-facebook::before { | |
font-family: "Font Awesome 5 Free"; | |
font-weight: 400; /* para marcas */ | |
content: "\f09a"; | |
} | |
/* estilos de la versión 5, mostrando el icono de un laptop */ | |
.icono-laptop::before { | |
font-family: "Font Awesome 5 Free"; | |
font-weight: 900; /* para solid */ | |
content: "\f109"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Enqueue scripts and styles for front end. | |
* | |
*/ | |
function scv_scripts_styles() { | |
//Código existente dentro de la función | |
} | |
add_action( 'wp_enqueue_scripts', 'scv_scripts_styles' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Enqueue scripts and styles for front end. | |
* | |
*/ | |
function scv_scripts_styles() { | |
//Código existente dentro de la función | |
//Enqueue font awesome | |
wp_enqueue_style( 'font-awesome', get_stylesheet_directory_uri().'/fontawesome/css/all.min.css' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'scv_scripts_styles' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment