Skip to navigation
Add custom fonts to the word-press editor
29.11.19
add this to your theme function: function load_custom_fonts($init) { $stylesheet_url = get_bloginfo('wpurl') .'/wp-content/themes/katz/css/fonts/Market-Regular/styles.css'; // Note #1 $stylesheet_url2 = get_bloginfo('wpurl'). '/wp-content/themes/katz/css/fonts/Market-Bold/styles.css'; // Note #1 if(empty($init['content_css'])): $init['content_css'] = $stylesheet_url . ',' . $stylesheet_url2; else: $init['content_css'] = $init['content_css'].','.$stylesheet_url . ',' . $stylesheet_url2;; endif; $font_formats = isset($init['font_formats']) ? $init['font_formats'] : 'Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Co\ mic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,m\ onaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats'; // Note #1 $custom_fonts = ';'.'Market-Regular=Market-Regular;Market-Bold=Market-Bold'; $init['font_formats'] = $font_formats . $custom_fonts; return $init; } add_filter('tiny_mce_before_init', 'load_custom_fonts');
http://learn.wpeditpro.com/adding-new-wordpress-tinymce-fonts/
Reply
Anonymous
Information Epoch 1758159098
Data dominates.
Home
Notebook
Contact us