Tagged: x
-
AuthorPosts
-
February 7, 2017 at 10:15 pm #1362271
KawikaParticipantHi,
I would like to use multiple font-weights for headings. Currently we are using Raleway (Google), and in customizer the font weight is set to 600.
I read an archived thread regarding this (https://community.theme.co/forums/topic/font-weight-2/) and added the following (see below) to our child functions.php but it’s not working.
// Remove and replace Raleway font // ============================================================================= function x_remove_replace_raleway_font(){ wp_dequeue_style( 'x-font-standard' ); wp_enqueue_style( 'raleway-font', '//fonts.googleapis.com/css?family=raleway:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic', NULL, X_VERSION, 'all' ); } add_action( 'wp_enqueue_scripts', 'x_remove_replace_raleway_font', 100 ); // =============================================================================February 7, 2017 at 10:25 pm #1362275
KawikaParticipantThis reply has been marked as private.February 8, 2017 at 2:00 am #1362459
FriechModeratorHi There,
Thanks for writing in! Please add this on top of your child theme’s style.css file.
@import url('https://fonts.googleapis.com/css?family=Raleway:300,300i,400');Hope it helps, Cheers!
February 8, 2017 at 4:18 pm #1363444
KawikaParticipantHi,
Thank you for your quick reply. Unfortunately adding the above css to my style.css file did not work. Is the code I added to my child’s functions.php correct?
Thanks,
KawikaFebruary 8, 2017 at 10:45 pm #1363822
FriechModeratorThis reply has been marked as private.February 9, 2017 at 5:35 pm #1365003
KawikaParticipantHi,
I decided to go with the functions.php route because we are still in design/dev phase and might want to explore other weights. It wasn’t working before because of a small typo in the URL (Aaah so frustrating). Anyway, your comment above regarding the correct URL let me relook at the code and I found my mistake.
Correct URL:
fonts.googleapis.com/css?family=Raleway:300,400,600,800In correct URL:
fonts.googleapis.com/css?family=raleway:100,300,400,800For anyone else looking to do this here’s what I added to our child themes functions.php file
// Remove and replace Raleway font // ============================================================================= function x_remove_replace_raleway_font(){ wp_dequeue_style( 'x-font-standard' ); wp_enqueue_style( 'raleway-font', '//fonts.googleapis.com/css?family=Raleway:300,400,600,800', NULL, X_VERSION, 'all' ); } add_action( 'wp_enqueue_scripts', 'x_remove_replace_raleway_font', 600 ); // =============================================================================Thanks for your help!!!
February 9, 2017 at 7:47 pm #1365248
NicoModeratorThanks for sharing us the fix. It would really help us and the other members of this community.
Feel free to ask us again.
Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1362271 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
