Okay
  Public Ticket #1440118
Fonts
Closed

Comments

  •  1
    openmk started the conversation

    I want to use a Google font - Barlow Condensed - but it is not listed as an option under Typography. 

    How do I correct that - or - in the alternative - I can add Barlow Condensed as @font face font in addition to Nexa Regular - how do I add two custom fonts. The snippet you provided only adds one custom font.

    https://themenectar.ticksy.com/article/9773/

    Thank you.

  •  2,725
    Andrew replied

    Hey there,

    Thanks for reaching in,

    Here's some options for you to use. http://www.wpbeginner.com/wp-themes/how-add-google-web-fonts-wordpress-themes

    Regards

  •  1
    openmk replied

    OK - get that - but then how do I add the fonts to the salient theme options?!

    I saw the code snippet for adding one custom font to the theme options but don't know how to use that to add two custom fonts.  Also, I'm confused as to why Barlow Condensed - which is a google font - isn't listed in the interface already?!

    Please advise.

  •  2,725
    Andrew replied

    Hey there,

    Thanks for reaching in,

    Please add this snippet in your functions.php file. 

    function wpb_add_google_fonts() {
     
    wp_enqueue_style( 'wpb-google-fonts', 'http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,700,300', false ); 
    }
     
    add_action( 'wp_enqueue_scripts', 'wpb_add_google_fonts' );

    Then you can replace with the font you want instead of 

    http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,700,300
    

    Then go to typography options and select said font.

    Hope this helps,

    Regards

  •  1
    openmk replied

    Thanks!


    mk

  • xcut replied

    @Andrew what about setting up a custom font-face in the CSS and having that up in the List, would you know the code i would need to insert?

  •  8,425
    Tahir replied

    Hey Again,

    Please have a look at this Article :Add a Custom Font.

    Be.st


    ThemeNectar Support Team