Tagged: font, font-family
-
AuthorPosts
-
November 1, 2016 at 7:28 pm #706835
Hello Kriesi and Enfold family.
Disclaimer: I’m not good with coding.
I hope you can help me with a problem regarding fonts. I have searched the web and found to fonts I would like to use on my website.
Crimson Text Regular for all headings and Source Sans Pro Regular for all normal text. Both Google fonts.
I have looked at the documentation file here:
and another support post here:
https://kriesi.at/support/topic/add-new-font/#post-234710But for some reason I can’t get my head around it..
I would love to be able to select them from the drop down menu in Enfold –> Generel styling –> Fonts or Enfold –> Advanced styling.I have tried to insert some code in the functions.php file and custom CSS. But the I can’t solve the problem.
Have you by any chance made a video of this, or a really easy guide to follow? :)
I hope you can help me.
Kind regards,
Gustav- This topic was modified 8 years ago by Casualmonkey.
November 2, 2016 at 9:35 am #707020Hey Casualmonkey,
Please send us a temporary admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply.
Best regards,
RikardNovember 3, 2016 at 10:55 pm #707981Hello Rikard,
Sounds great! I really hope you can help me solve my problem.
Kind regards,
GustavNovember 4, 2016 at 1:09 am #707998Hi Kriesi,
Can I please ask for the same help with the Google font – Titillium Web
I would like the font to visible in the Enfold theme dropdown list.
Br Claus
November 4, 2016 at 9:22 am #708092Hi Gustav,
I see that you are not using a child theme, that means that all changes made to your theme will be overwritten on updates. Could you download and set up a child theme first maybe? http://kriesi.at/documentation/enfold/downloads/.
After that you can go to Udseende->Editor and paste the following code into the end of the file called functions.php:
add_filter( 'avf_google_heading_font', 'avia_add_heading_font'); function avia_add_heading_font($fonts) { $fonts['PT Sans Narrow'] = 'PT Sans Narrow:400,700'; $fonts['PT Sans'] = 'PT Sans:400,700,400italic,700italic'; return $fonts; } add_filter( 'avf_google_content_font', 'avia_add_content_font'); function avia_add_content_font($fonts) { $fonts['PT Sans'] = 'PT Sans:400,700,400italic,700italic'; $fonts['PT Sans Narrow'] = 'PT Sans Narrow:400,700'; return $fonts; }
Make sure it’s working after doing this, after that you can simply replace PT Sans with the font you want to import.
Best regards,
RikardNovember 4, 2016 at 10:01 am #708108Hi Rikard,
I hope it is OK that I mail you an administrator login to my site also.
I do have a Child Theme installet. Just need the Google Font – Titillium Web installet.
Br Claus
November 5, 2016 at 1:39 pm #708683Hello Rikard,
Great! Amazing it works :)
Thank you very much. The guide for the child theme was really useful.
The code you send is also working as well. Great!If I would like to instal the Crimson text font as well, should I just replace “PT Sans Narrow” with “Crimson Text”?
Another question. Before I installed the child theme I had the API key set up for automatically updates on the theme. How do I do that now? Should I just insert my key in the child theme?
Thank you so much for the help,
Kind regards,
GustavNovember 7, 2016 at 5:39 am #709010Hi,
Yes, you can use it on your child theme since it’s just the same site. And yes, you can replace PT Sans Narrow with Crimson text :)
Best regards,
NikkoNovember 8, 2016 at 1:31 pm #709769Thank you very much for your help. It’s priceless :)
Kind regards,
GustavNovember 9, 2016 at 7:36 am #710091Hi Gustav,
Glad we could help :-)
Please let us know if you should need any further help on the topic.
Best regards,
RikardMay 30, 2018 at 12:53 pm #964184Hello,
I tested all commands that I found in this forum for CSS and function.php but I coud not change headlines to google font “cinzel” I am using the Child Theme. I tested in the function.php of the enfold and enfold child-theme
Can you please help me? Thanks a lot
June 1, 2018 at 1:24 pm #965307Hi Semito,
Yes, if you use Enfold 4.4, you use this code:
add_filter( 'avf_available_google_fonts', 'avia_add_google_font'); function avia_add_google_font( $fonts ) { $fonts['Cinzel'] = 'Cinzel'; return $fonts; }
You should find Cinzel last in the list.
Hope this helps :)Best regards,
NikkoJune 4, 2018 at 7:30 am #966347Hello Nikko…I tryed in CSS and also child theme function.php but it does not work!
Do you have another Idear?
Best Regards
June 4, 2018 at 11:22 am #966452Hi Semito,
Can you give us admin access? so we can check it further.
Have tested it on my end and it does work.
Maybe some caching issue? just post the details in private content.Best regards,
NikkoJune 7, 2018 at 2:13 pm #968942Hello Nikko did you get the private Admin Access?
Thank you best regards
June 7, 2018 at 4:26 pm #969689Hi Semito,
No, I haven’t received it, Private Content is located at the bottom of the textarea where you reply, you should see this text above it:
Private Content (link to your website, login credentials, FTP credentials, etc – only visible for moderators)
Content in there is only visible to you as the thread creator and moderators.Best regards,
NikkoJune 7, 2018 at 5:06 pm #969700This reply has been marked as private.June 11, 2018 at 4:16 am #970927Hi Semito,
I apologize for the late response.
Ftp is working fine but the wp-admin access isn’t working please check.Best regards,
NikkoJune 11, 2018 at 10:38 am #971061oh….sorry this is the right one!!!
Thank you very much!!!
June 13, 2018 at 1:42 am #971983Hi,
Thanks for the update. The Appearance > Editor panel is not accessible though. Please enable it or provide the FTP details. You should add that filter in the child theme’s functions.php file. Don’t forget to refresh the page afterwards.
Best regards,
IsmaelJuly 3, 2018 at 11:33 am #980505Hello Ismael,
thank you and sorry for the late reply. I sended you the ftp details. best regardsJuly 4, 2018 at 11:35 am #981097Hi Semito,
I have tried to access the ftp with the details you gave however it doesn’t work.
Also I checked your site, which text did you use the Cinzel font? I do see Cormorant font used.Best regards,
NikkoJuly 5, 2018 at 11:06 am #981515Hello Nikko,
I am using another Font because Cinzel is not in the Enfold Font list. But for the headlines I need to use Cinzel for my client!!!
I am using Wise ftp with these details?
Thank u very muchJuly 9, 2018 at 3:40 pm #983147February 25, 2019 at 8:21 pm #1071455It would be nice to know if filters are renamed or replaced by other ones – maybe in the changelog of a new version!
the new : avf_available_google_fonts – i just recognized it on some pages where the content font does not work like before
February 27, 2019 at 12:56 am #1072091Hi,
// https://kriesi.at/support/topic/ava_before_content-hook-does-not-work/#post-1071673
Best regards,
Ismael -
AuthorPosts
- The topic ‘How to change theme font family’ is closed to new replies.