Tagged: child theme, custom fonts, enfold
-
AuthorPosts
-
April 9, 2015 at 12:12 am #425647
I want to use custom fonts via a webscript from Fonts.com. They want the placement of a javascript placed between <head> and </head> then css code for the font family designation for the various font areas. I’m using a child theme, but I don’t see anything in the theme options section on where I can place the javascript like other themes provide. How do I install the script and where to I install.
April 9, 2015 at 8:18 am #425740Hey MtnStreamGroup!
Thank you for using Enfold.
Please post the required scripts in order to install the font. We would like to check it. You can add it directly in the header.php file if you want or use the wp_head hook. https://codex.wordpress.org/Plugin_API/Action_Reference/wp_head
Cheers!
IsmaelApril 9, 2015 at 5:59 pm #426112This reply has been marked as private.April 10, 2015 at 8:29 pm #426759Hey!
Try adding this at the very end of your child theme functions.php file:
function custom_add_to_head() { ?> <script type=”text/javascript” src=”http://fast.fonts.net/jsapi/7eae90d8-4c8b-4170-b63b-78887d1ce8f1.js”></script> <link type=”text/css” rel=”stylesheet” href=”http://fast.fonts.net/cssapi/7eae90d8-4c8b-4170-b63b-78887d1ce8f1.css”/> <?php } add_action('wp_head', 'custom_add_to_head');
Then add this to Quick CSS to assign the fonts to the elements you want:
h1,h2,h3,h4,h5,h6{ font-family:’FuturaW01-ExtraBoldCond_774896′; } body, p{ font-family:’Futura W01 Medium'; }
Cheers!
JosueApril 15, 2015 at 6:35 pm #429138This reply has been marked as private.April 16, 2015 at 10:24 am #429471Hey!
Hand me a FTP account in a private reply.
Best regards,
JosueApril 16, 2015 at 6:28 pm #429801This reply has been marked as private.April 16, 2015 at 7:35 pm #429842Both, if possible.
Regards,
JosueApril 16, 2015 at 8:35 pm #429886This reply has been marked as private.April 16, 2015 at 10:33 pm #429943You can use (Email address hidden if logged out) .
April 16, 2015 at 11:15 pm #429967This reply has been marked as private.April 16, 2015 at 11:32 pm #429976Hey!
Check it now, there was some issues with the quotes in the code, i’ve re-added it (functions.php and style.css) and you can see now that is working. I’ve also disabled WP Super Cache.
Regards,
JosueApril 16, 2015 at 11:37 pm #429983This reply has been marked as private.April 17, 2015 at 12:01 am #430003There needs to be a better and simpler way of installing and managing custom fonts. No different than the way you allow the use of Google fonts.
April 17, 2015 at 12:27 am #430022Feel free to request an idea here as a new feature.
Best regards,
Josue -
AuthorPosts
- You must be logged in to reply to this topic.