- This topic has 6 replies, 3 voices, and was last updated 4 years ago by Leo.
-
AuthorPosts
-
March 30, 2020 at 2:19 am #1219192sjoerd89
Hi there,
i want to add a new font to my menubar/navigation. It is a Font that currently is not in wordpress itself called “Barlow”.
I have seen some topics about this but still can’t seem to figure it out, any tips?March 30, 2020 at 6:29 am #1219409DavidStaffCustomer SupportHi there,
try adding this PHP snippet:
add_filter( 'generate_typography_customize_list', 'tu_add_google_fonts' ); function tu_add_google_fonts( $fonts ) { $fonts[ 'barlow' ] = array( 'name' => 'Barlow', 'variants' => array( '400', '500', '700' ), 'category' => 'sans' ); return $fonts; }
https://docs.generatepress.com/article/adding-php/
You can update
array( '400', '500', '700' )
to add the different weights you need.March 30, 2020 at 7:20 am #1219475sjoerd89I added the font to my website and now trying to get my menubar the same as our productpage:
https://www.zilvertron.com/ is the current one where i want the same navigation style like
products.zilvertron.comI tried some stuff out but can’t seem to figure out what is going wrong:
.main-navigation li { margin-left: 10px; border: none!important; font-family: Barlow, Array, sans-serif; font-size: 16px; font-weight: 600; line-height: 18px; } .main-navigation a, .menu-toggle { font-family: "Barlow", Array, sans-serif; font-size: 16px; font-weight: 600; line-height: 18px; margin-left: 10px; border: none!important; } .main-navigation li a { font-size: 12px; line-height: 20px; }
March 30, 2020 at 8:06 am #1219694sjoerd89Already got it pretty close with
.main-navigation li { margin-left: 10px; /*border: none!important;*/ font-family: Barlow, Array, sans! important; font-size: 16px!important; font-weight: 400; line-height: 16px!important; } .main-navigation a, .menu-toggle { font-family: Barlow, Array, sans! important; font-size: 16px!important; font-weight: 400; line-height: 18px; //*margin-left: 10px;*// border: none!important; } .main-navigation li a { font-size: 16px; line-height: 20px; }
Probably not the nice way how it should be done.
Also is it possible to get a image in the navigation bar aswell like on products.zilvertron.com with the shopcart?
March 30, 2020 at 9:43 am #1219797LeoStaffCustomer SupportIs the menu all good now? If not we would need to see the page in question.
Any chance you can open a new topic for the new question?
Thanks ๐
March 30, 2020 at 11:44 pm #1220362sjoerd89I think the menu is fine will open a new topic thanks.
March 31, 2020 at 9:22 am #1221058LeoStaffCustomer SupportThanks ๐
-
AuthorPosts
- You must be logged in to reply to this topic.