fahimmurshed

How to add custom fonts without plugin on Astra theme

May 18th, 2020 (edited)
1,009
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.41 KB | None | 0 0
  1. // Add custom fonts without plugin on Astra theme
  2. // More info on https://fahimm.com
  3. add_filter( 'astra_system_fonts', 'add_system_fonts' );
  4.  
  5. function add_system_fonts( $fonts ) {
  6.  
  7.     $additional_fonts = array(
  8.         'Hiragino Sans' =>  array(
  9.             'fallback' => 'Meiryo,sans-serif'
  10.         ),
  11.         'Hiragino Serif' => array(
  12.             'fallack' => 'MS PMincho,serif'
  13.         )
  14.     );
  15.  
  16.     return array_merge( $fonts, $additional_fonts );
  17. }
Add Comment
Please, Sign In to add comment