Forum Replies Created
-
AuthorPosts
-
Installing Adobe fonts to work with enfold:
I have used another user’s template, but I was getting errors when implementing his solution. It turned out that all the quotation marks used in the solution was not of the correct style. I replaced all the single and double quotation marks in a text editor with the correct ones.Here is a short overview before updating the functions.php in the child theme of enfold
1) Activate a font in adobe fonts by sliding the toggle switch of the font you want to use. The slider will turn blue.
2) Look for the </> opposite the slider and click on it.
3) Add the font to a project by tapping the down arrow button and create a new one or add to an existing project.
4) Save > and a new window will pop up. At the top of the window you will see: <link rel=”stylesheet” href=”https://use.typekit.net/xyxyxyx.css”>
take note of the code before .css”> yours will be unique.
5) Take note of the font name and the weight. I copied and pasted it into my text editor, where required. Replace your font and font weight where I used freight-sans in step (7) and use the code in step (4) at the bottom of the php code in (7).
6) The text editor on this forum changes all the single and double quotation marks to the wrong format. You would need to manually edit everyone one in a text editor for the code in (7) to work7)
/* Adobe typekit font */
add_action( ‘init’, ‘enfold_customization_switch_fonts’ );
function enfold_customization_switch_fonts() {
global $avia;
$avia->style->print_extra_output = false;
}add_filter( ‘avf_google_heading_font’, ‘avia_add_heading_font’);
function avia_add_heading_font($fonts)
{
$fonts[‘Freight Sans Pro’] = ‘freight-sans-pro:400’;
$fonts[‘Freight Sans Compressed Pro’] = ‘freight-sans-compressed-pro:500’;
return $fonts;
}
add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
function avia_add_content_font($fonts)
{
$fonts[‘Freight Sans Pro’] = ‘freight-sans-pro:400’;
$fonts[‘Freight Sans Compressed Pro’] = ‘freight-sans-compressed-pro:500’;
}add_filter( ‘wp_head’, ‘enfold_customization_add_scripts’ );
function enfold_customization_add_scripts(){
?>
<link rel=”stylesheet” href=”https://use.typekit.net/xxxxxxx.css”>
<?php
}8) Save the code in (7) with your info in a file named Functions.php by using a text editor and FTP the file to the folder of your enfold child installation.
public_html/the path where you installed wordpress/wp-content/themes/enfold_child
9) this new Functions.php file will only work if your child theme is the template that you activated in your wordpress themes dashboard
10) the fonts appeared for me at the bottom of the list of fonts available to chose from in enfold dashboard- This reply was modified 4 years ago by fivepixels.
-
AuthorPosts