-
Author
-
October 15, 2017 at 21:58 #176757alexliiParticipant
Hello,
When we create a page, the Visual composer will connect google fonts resource automatically, since we are blocked in China to access google fonts, it will caused delay.
We are use some plugin like Remove google fonts to disable that connection, but it does not work anymore in WordPress 4.8.
It would be great appreciated if you can let me know how to remove that connection in Visual composer.
Thanks.
Alex
October 15, 2017 at 22:11 #176759Kieran_SQModeratorHi,
Please try the below snippet in your KLEO Child theme’s functions.php by going to WP Admin > Appearance > Editor > KLEO Child > Functions.php
COPY CODE// Remove Google Fonts from being called in page editor add_action( 'vc_after_init', 'vc_after_init_actions' ); function vc_after_init_actions() { // Remove VC Elements if( function_exists('vc_remove_element') ){ // Remove Google Fonts Custom Heading vc_remove_element( 'vc_custom_heading' ); } }
Thanks,
Kieran.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
October 16, 2017 at 09:30 #176778alexliiParticipantThanks, but it does not work for us. we are running wordpress Multisite 4.8, so, I copied your code into Kleo-child function.php, and upload it with FTP.
the reason why it does not work might be related Multisite? or what did I wrong?
Here is screenshot for your reference: http://prntscr.com/gxy59o
Alex
October 16, 2017 at 18:06 #176884Kieran_SQModeratorHi,
Sorry to hear this is not working for you, it worked for me on a live and local site. I will ask one of our developers @radu to take a look at this for you as they will have a much better insight into the intricacies of multisite.
Thank you for your patience,
Kieran.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
October 17, 2017 at 16:24 #176957RaduModeratorHi,
Finally figured our .. some google fonts are loaded thru CSS with include and cannot be dequeue with wp_dequeue_fonts
So you will have to delete the highlited code from those files
1. /wp-content/plugins/js_composer/assets/css/js_composer_frontend_editor.min.css
2. /wp-content/plugins/js_composer/assets/css/js_composer_backend_editor.min.cssYou can ask visual composer if they are in plan to add a option ON/OFF google fonts or maybe a better solution.
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionOctober 19, 2017 at 03:41 #177092alexliiParticipantThanks.
It works at frontend, but it does not work at backend, once I create a new page, it will still keep connecting to google fonts.
Yes, I did wrote them before, and rewrite to them just now(https://codecanyon.net/item/visual-composer-page-builder-for-wordpress/242431/comments).
Thanks so much.
Alex
October 19, 2017 at 17:19 #177133RaduModeratorHi,
Check also those files, those have link to the fonts.googleapis.com :
1. /wp-content/plugins/js_composer/include/templates/shortcodes/vc_custom_heading.php
2. /wp-content/plugins/js_composer/include/templates/shortcodes/vc_gitem_post_author.php
3. /wp-content/plugins/js_composer/include/templates/params/vc_grid_item/shortcodes/vc_custom_heading.php
4. /wp-content/plugins/js_composer/include/templates/shortcodes/vc_gitem_post_data.phpIn all those files a wp_enqueue line exist with the same font and code apparently, comment them.
Suggest to vc team to add an option or a filter that prevents google fonts to load.
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionOctober 22, 2017 at 10:24 #177359alexliiParticipantHello,
Thanks, I comment all that lines, actually, I comment another one in a file named: vc_ui-fonts.less.
and please check here:http://prntscr.com/h0fjx2
but it still does not work at backend, it is really troubled, I wrote to VC team twice before, but no reply yet.
It would be great if you can wrote them too on behalf of Seventh queen theme developer, thanks a lot.
Alex
October 23, 2017 at 16:16 #177510RaduModeratorHi,
Will speak with the core developer about this. but most sure they will reply to you when they have availability.
If you have a VPS you can try to do a workaround, from the host file of the server set an artificial 200 response but empty response from the google fonts hosts
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionNovember 8, 2017 at 06:47 #179240alexliiParticipantHello,
If you have a VPS you can try to do a workaround, from the host file of the server set an artificial 200 response but empty response from the google fonts hosts
any article for reference? thanks for your instruction.
Alex
November 8, 2017 at 17:24 #179270RaduModeratorHi,
There is no article, you should root from your hosts file of the server the font.googleapis.com to a server that says 200 , i don’t have exact steps for that, this is only a idea
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘Plugins questions’ is closed to new topics and replies.