NEW RESTAURANT WP THEME - SALE 54 $

VIEW DEMO

How to add a new font

There are some google fonts included in the theme but you can implement them by following these steps:

Google Font

Go in Google font library and select a font that you want to use. Next, click on the icon “plus” red button, that you find at the top right of the font title, for open an infobox to choose the styles you want to use. You should only select styles that you think you will actually use.

header-3

If you need more style you can go in the tab “CUSTOMIZE” and select an Latin Extended Supported (if the font allows it) and all style that you need (light 300, regular 400, medium 500 or others).

When you have select all option that you need for you font come back on the “EMBED” tab and copy the embed font code like this one:

Inknut+Antiqua:300,400,500,600,700

Customizer File

Go in this file:

plugins/nd-shortcodes/addons/customizer/fonts/index.php

In the customizer you can choose the font for 3 categories ( Headings Font, Paragraph Font and Third Font ) and in this case you have to decide in which category you want to add the new font. In this example we will add a new font for the “Headings Font” so please find this code:

$wp_customize->add_control( 'nd_options_customizer_font_family_h', array(
  'label' => __('Headings Font','nd-shortcodes'),
  'type' => 'select',
  'description' => __('Select font family for your Headings, you can also use this font by using the class <strong>.nd_options_first_font</strong> in your code. <a target="_blank" href="https://www.google.com/fonts">Click here</a> to see the fonts.','nd-shortcodes'),
  'section' => 'nd_options_customizer_font_family_section',
  'choices' => array(
        'Montserrat:400,700' => 'Montserrat',
        'Playfair+Display:400,400italic,700,700italic,900,900italic' => 'Playfair Display',
        'Lora:400,400italic,700,700italic' => 'Lora',
        'Varela+Round' => 'Varela Round',
        'Cinzel:400,700' => 'Cinzel',
        'Halant:300,400,700' => 'Halant',
        'Open+Sans:300,400,700' => 'Open Sans',
        'Great+Vibes' => 'Great Vibes',
    ),
) );

Adding the Font

Now you have only to create new options on the list. In our example we are adding the font “Inknut Antiqua” and you can add it in this way:

$wp_customize->add_control( 'nd_options_customizer_font_family_h', array(
  'label' => __('Headings Font','nd-shortcodes'),
  'type' => 'select',
  'description' => __('Select font family for your Headings, you can also use this font by using the class <strong>.nd_options_first_font</strong> in your code. <a target="_blank" href="https://www.google.com/fonts">Click here</a> to see the fonts.','nd-shortcodes'),
  'section' => 'nd_options_customizer_font_family_section',
  'choices' => array(
        'Montserrat:400,700' => 'Montserrat',
        'Playfair+Display:400,400italic,700,700italic,900,900italic' => 'Playfair Display',
        'Lora:400,400italic,700,700italic' => 'Lora',
        'Varela+Round' => 'Varela Round',
        'Cinzel:400,700' => 'Cinzel',
        'Halant:300,400,700' => 'Halant',
        'Open+Sans:300,400,700' => 'Open Sans',
        'Great+Vibes' => 'Great Vibes',
        'Inknut+Antiqua:300,400,500,600,700' => 'Inknut Antiqua',
    ),
) );

In this way it has been added the last line of code 'Inknut+Antiqua:300,400,500,600,700' => 'Inknut Antiqua' composed by the style of the font and the family name.

Categories :

Can't find what you're looking for ? Ask our support team.

© Clean Themes Studio - PI 04892530280