Add custom fonts to appear on my font list in the The7.io

  • Posted:
  • Proposals: 3
  • Remote
  • #2385902
  • Awarded
Robert H.
James M.SAYFUR R. have already sent a proposal.
  • 0

Description

Experience Level: Intermediate
I need to add following fonts
League Gothic (adobe)
Bebas Neue ( adobe)
Big Caslon

to appear on my font list in the The7.io theme.


Here are instructions:
http://support.dream-theme.com/knowledgebase/add-custom-font/

Upload font files to your website, for example, into …/wp-content/uploads/fonts/

then add @font-face in Theme Option > Advacned > Custom CSS or child theme style-sheet this way:

@font-face {
font-family: 'Gruppo';
src: url('/wp-content/uploads/fonts/Gruppo_reg.eot');
src: url('/wp-content/uploads/fonts/Gruppo_reg.eot') format('embedded-opentype'),
url('/wp-content/uploads/fonts/Gruppo_reg.woff') format('woff'),
url('/wp-content/uploads/fonts/Gruppo_reg.ttf') format('truetype'),
url('/wp-content/uploads/fonts/gruppo_reg.svg#Gruppo') format('svg');
}

Now you can either apply font using custom CSS like this:

body, p, h1, h2 {
font-family: 'Gruppo' !important;
}

Add a font to theme font list

Please add the following code into the end of your functions.php file:

function add_custom_font( $fonts ) {

$fonts['Gruppo'] = 'Gruppo';
return $fonts;
}

add_filter( 'presscore_options_get_safe_fonts', 'add_custom_font' ,30 , 1 );

Now This font is available in Theme Options > Typography > font list.

Note: If you want to specify font with weight you can do this using following code notation in add_custom_font() function.

$fonts['Gruppo:500'] = 'Gruppo(500)'; //for 500 weight
$fonts['Gruppo:700'] = 'Gruppo(700)'; //for 700 weight

New Proposal

Create an account now and send a proposal now to get this project.

Sign up

Clarification Board Ask a Question

    There are no clarification messages.