-
AuthorPosts
-
October 3, 2017 at 11:26 am #859587
I have a root folder with all font extension. How can use it in function.php of my theme child?
October 3, 2017 at 12:15 pm #859596or you use a google font instead : i think ropa is very nearby the DIN Font
October 3, 2017 at 12:18 pm #859598Yes, Ropa is similar http://lumex.it/nuovo/
October 4, 2017 at 8:13 am #859971October 4, 2017 at 8:33 am #859988Really no, I want use DIN font not Rpa Sans :-)
October 4, 2017 at 8:51 am #860027Hi,
This plugin should help you: https://wordpress.org/plugins/use-any-font/
Best regards,
John TorvikOctober 4, 2017 at 6:29 pm #860261ropa not roboto ! this is on default not integrated in enfold.
tell us exactly where your fonts are (maybe a good place is /wp-content/uploads/fonts) and the names of your files
than you might place a @import rule to style.css of your child-theme – something like this:
@font-face{ font-family: 'MyWebFont'; src: url('WebFont.eot'); src: url('WebFont.eot?#iefix') format('embedded-opentype'), url('WebFont.woff') format('woff'), url('WebFont.ttf') format('truetype'), url('WebFont.svg#webfont') format('svg'); }
you have to put in your path to your files
____________________________
if you like to test Ropa – this goes to functions.php of your child-theme:add_filter( 'avf_google_heading_font', 'avia_add_heading_font'); function avia_add_heading_font($fonts) { $fonts['Ropa Sans'] = 'Ropa Sans:400,400i'; return $fonts; } add_filter( 'avf_google_content_font', 'avia_add_content_font'); function avia_add_content_font($fonts) { $fonts['Ropa Sans'] = 'Ropa Sans:400,400i'; return $fonts; }
- This reply was modified 7 years, 2 months ago by Guenni007.
October 5, 2017 at 9:34 am #860495October 5, 2017 at 10:07 am #860505Thanks, I insert folder font under /uploads/fonts and in function.php
@font-face{
font-family: ‘DIN’;
src: url(‘din-next.eot’);
src: url(‘din-next?#iefix’) format(’embedded-opentype’),
url(‘din-next.woff’) format(‘woff’),
url(‘din-next.ttf’) format(‘truetype’),
url(‘din-next.svg#webfont’) format(‘svg’);
}October 6, 2017 at 5:54 am #860852Hi,
Thanks for the feedback, did you paste the CSS in functions.php? If so then please move it to Quick CSS.
Best regards,
RikardOctober 18, 2017 at 8:56 am #865578Yesm, it is in child style.css and my fonts under /wp-content/uploads/fonts
October 19, 2017 at 1:42 am #866024Hi,
Please refer to this post and add your custom fonts – http://justcreative.com/2013/01/22/how-to-use-custom-fonts-with-font-face-on-wordpress/
Best regards,
Yigit -
AuthorPosts
- You must be logged in to reply to this topic.