Tagged: font, google font
-
AuthorPosts
-
June 8, 2017 at 6:06 pm #805692
Hi Kriesi,
Thank you for a great theme and all the support you provide us.
I have been reviewing several threads regarding updating fonts and have tried several of the solutions you have offered other users however without success. I want to avoid using a plug-in. I am trying to load the Google font: Roboto to be used in- body text content
(not headings).
From http://kriesi.at/documentation/enfold/register-additional-google-fonts-for-theme-options/
I have tried adding this to functions.php but the Roboto font is not available when I go to ->General Styling ->Fonts under the body text options:add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
function avia_add_content_font($fonts)
{$fonts[‘Roboto’] = ‘Roboto:400,700,400italic,700italic’;
return $fonts;
}I also tried this iteration of the ablove:
add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
function avia_add_content_font($fonts)
{$fonts[‘Roboto’] = ‘Roboto:400,700’;
$fonts[‘Roboto’] = ‘Roboto:400italic,700italic’;
return $fonts;
}Please advise what i am missing for the Google font- Roboto to be available as body text.
Thank you—-from ticket: #668377 ——-
add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
function avia_add_content_font($fonts)
{$fonts[‘Roboto’] = ‘Roboto:400,700,400italic,700italic’;
return $fonts;
}AM I missing something here?
—from ticket: #639232 —–
add_filter( ‘avf_google_heading_font’, ‘avia_add_heading_font’);
function avia_add_heading_font($fonts)
{
$fonts[‘Roboto’] = ‘Roboto’;
return $fonts;
}add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
function avia_add_content_font($fonts)
{
$fonts[‘Roboto’] = ‘Roboto’;
return $fonts;
}June 11, 2017 at 4:42 am #806444Hey tlchase,
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,
RikardJune 12, 2017 at 4:05 pm #806929Unfortunately the institution where I work has strict firewalls that prevent this. They can only ‘whitelist’ a specific IP address if you can provide that however I’ve suggested this in the past to you guys without success. Trust me, I wish I could since it would make my life that much easier troubleshooting.
That said, can you (anyone) confirm my previous message with the specifics I put on the functions.php file? I got this from 2 previous threads that seemed to have worked for other users.
Any suggestions? I feel this should be somewhat straightforward however let me know what you would like me to take a screenshot of that you normally would use admin access to review.I am trying to load the Google font: Roboto to be used in body text content (not headings).
From http://kriesi.at/documentation/enfold/register-additional-google-fonts-for-theme-options/June 13, 2017 at 3:58 pm #807542Hi tlchase,
Here is a great article about adding fonts, even though it does not address your issue directly
https://booking.design/implementing-system-fonts-on-booking-com-a-lesson-learned-bdc984df627f
When you pasted the code from the snippets did they have those weird single quotes or they were normal? That makes a difference. Do you have that font installed? You can try to replace‘ to ' and ’ to '
and paste the snippet again, otherwise it will not work.
Best regards,
VictoriaJune 13, 2017 at 10:13 pm #807641Thanks for the article however as you said, it does not directly address my issue.
I am unsure what weird single quotes you are referring to…I literally copied and pasted the exact code from previous tickets: #668377 and #639232 and from the following directly related article: http://kriesi.at/documentation/enfold/register-additional-google-fonts-for-theme-options/
I’ve been doing a lot of research within previous related tickets and posted them here but I am still unable to get the font Roboto under the body text options.Can someone please review these tickets/article and advise what I am missing? To confirm, the end result from adding this code to the functions.php will result in my being able to select the font Roboto from the dropdown menu within the body text options when I go to ->General Styling ->Fonts under the body text options correct?
Thank you
June 13, 2017 at 10:44 pm #807651Screenshot below as it appears on functions.php:
June 13, 2017 at 11:16 pm #807673I have also tried all references on this ticket: #297402 and still unable to access Roboto under body content.
I tried the following variances:
add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
function avia_add_content_font($fonts)
{$fonts[‘Roboto’] = ‘Roboto’;
return $fonts;
}AND
add_filter( ‘avf_google_content_font’, ‘avia_add_content_font’);
function avia_add_content_font($fonts)
{$fonts[‘Roboto’] = ‘Roboto’;
return $fonts;
}June 14, 2017 at 6:55 pm #808157Hi tlchase,
I see your credentials, but I don’t see the link to the website. Can you send it to us?
Best regards,
VictoriaJune 14, 2017 at 7:40 pm #808176Link to the site below.
Unfortunately the institution where I work has strict firewalls that prevent this. They can only ‘whitelist’ a specific IP address if you can provide that however I’ve suggested this in the past to you guys without success. Trust me, I wish I could since it would make my life that much easier troubleshooting.
Let me know what you would like me to take a screenshot of that you normally would use admin access to review.June 16, 2017 at 9:59 pm #809119Hi,
we can not whitelist one address, support is 10 people right now! :)
Best regards,
BasilisJune 16, 2017 at 10:40 pm #809132I understand, I was just responding to Victoria since she asked and Ive been through this before (which I wrote on my response “…I’ve suggested this in the past to you guys without success”).
Please let me know what else you need to see to assist me. I’ve provided screenshots of exactly how the code appears in my functions.php which I got from other tickets which I have referenced as well as the various codes from other user’s same issue.Can 1 of your 10 people please direct me as to what is off on the codes I’ve been trying and posted above? I’ve read numerous articles and Kriesi Enfold tickets and tried various options (referenced above). If you recommend I use a plug-in at this point to have the Roboto body text, then please advise….I tried the plugin Easy Google Fonts however perhaps you could recommend another plugin in order to use Roboto font. I prefer to do this the “cleaner way” via functions.php so just let me know what you need me to take a screenshot of that you would normally go to using admin access.
Thank you again for taking the time to read each of the above responses I’ve provided to assist me with this, I understand it’s a pain having to go through several responses however if you could please see my history and assist me, I would greatly appreciate any guidance on this.
Thank you again for all your support and patience.
June 21, 2017 at 6:07 am #810750Hi,
There’s a little mistake in the previous filter. Please remove it then use the following code instead.
add_filter( 'avf_google_content_font', 'avia_add_content_font'); function avia_add_content_font($fonts) { $fonts['Google fonts']['Roboto'] = 'Roboto:400,700,400italic,700italic'; return $fonts; }
Go to the General Styling > Fonts panel to select the “Roboto” font.
Best regards,
IsmaelJune 22, 2017 at 4:42 pm #811659I’ve tried copying and pasting the above filter to the functions.php file however I am still unable to view the roboto font. Screenshots attached below:
Any other suggestions are greatly appreciated.June 25, 2017 at 10:33 pm #812830Hi,
What is your backend details please, so we can take a look?
Thank youBest regards,
BasilisJune 26, 2017 at 3:49 pm #813118I understand this is becoming a long thread however please read all responses To better assess my issue and resolution attempts, I have been trying several resolution options unsuccessfully from many closed tickets that I have provided for reference.
Unfortunately the institution where I work has strict firewalls that prevent this. They can only ‘whitelist’ a specific IP address if you can provide that however I’ve suggested this in the past to you guys without success since you have 10 mods. Trust me, I wish I could since it would make my life that much easier troubleshooting.
Let me know what you would like me to take a screenshot of that you normally would use admin access to review.Thank you again for taking the time to read each of the above responses I’ve provided to assist me with this, I understand it’s a pain having to go through several responses however if you could please see my history and assist me, I would greatly appreciate any guidance on this since I am still unable to apply them.
Thank you
June 28, 2017 at 7:01 am #813689Hi,
Did you remove the previous filters? I just added the filter again in my installation’s functions.php file and it is working as expected. Do you have a cache plugin? Please remove or purge the cache after adding the filter. Or post the login details here so that we can test it.
Best regards,
IsmaelJune 28, 2017 at 5:10 pm #813972Which previous filters? I copied and pasted the code you provided Ismael and that’s the only filter i have for this font in functions.php…
I had provided an exact screenshot of how it appears in functions.php and how the Font dropdown- “Defines the Font for your body text” doesn’t have Roboto as an option (image below as well)..I’m not sure what else to try. As mentioned above:
Unfortunately the institution where I work has strict firewalls that prevent logging in remotely. They can only ‘whitelist’ a specific IP address if you can provide that even if it takes a few days for the same Moderator (Ismael) to view this ticket since this ticket was opened 20 days ago, I wouldnt mind whitelisting your particular ip so you can log in to the backend next time you log on. Otherwise, let me know what you would like me to take a screenshot of that you normally would use admin access to review.Thank you again for taking the time to read each of the above responses I’ve provided to assist me with this, I understand it’s a pain having to go through several responses however if you could please see my history and assist me, I would greatly appreciate any guidance on this since I am still unable to apply them.
June 28, 2017 at 5:49 pm #814017So I finally figured it out, apparently the code needs to be entered at the very top after <?php
Thank you anyway for looking into this.
June 29, 2017 at 10:20 am #814324 -
AuthorPosts
- The topic ‘Google Font not working per previous threads’ is closed to new replies.