如何加上「;“机器人”;wordpress的TinyMCE高级下拉菜单中的字体?

如何加上「;“机器人”;wordpress的TinyMCE高级下拉菜单中的字体?,wordpress,fonts,tinymce,Wordpress,Fonts,Tinymce,我该怎么办?我用英语、西班牙语、意大利语搜索,但没有找到有用的指南 您好,很抱歉我之前的回答,我的主题搞错了 在子主题的header.php文件中(如果不存在,请从父主题复制),您需要在下一行之前添加Roboto字体: <?php wp_head(); ?> 然后您可以在中选择Roboto字体 如果这个答案让您高兴,请不要忘记投票:)谢谢您的帮助,但我仍然没有将roboto添加到tinymce advanced。我复制了你的代码,但它不工作,看:头->和函数->为什么?你在使用这个

我该怎么办?我用英语、西班牙语、意大利语搜索,但没有找到有用的指南


您好,很抱歉我之前的回答,我的主题搞错了

在子主题的header.php文件中(如果不存在,请从父主题复制),您需要在下一行之前添加Roboto字体:

<?php wp_head(); ?>
然后您可以在中选择Roboto字体


如果这个答案让您高兴,请不要忘记投票:)

谢谢您的帮助,但我仍然没有将roboto添加到tinymce advanced。我复制了你的代码,但它不工作,看:头->和函数->为什么?你在使用这个插件吗?没错,是的。我使用这个插件,它应该工作,因为我测试前发布它。您创建了一个子主题,创建了一个名为functions.php的文件?不,我没有创建子主题。我是wordpress的新手,你能解释一下怎么做吗?谢谢
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
<?php wp_head(); ?>
add_filter( 'tiny_mce_before_init', 'mce_custom_fonts' );
function mce_custom_fonts( $init ) {
    $theme_advanced_fonts = "Andale Mono=andale mono,times;" .
                            "Arial=arial,helvetica,sans-serif;" .
                            "Arial Black=arial black,avant garde;" .
                            "Book Antiqua=book antiqua,palatino;" .
                            "Comic Sans MS=comic sans ms,sans-serif;" .
                            "Courier New=courier new,courier;" .
                            "Georgia=georgia,palatino;" .
                            "Helvetica=helvetica;" .
                            "Impact=impact,chicago;" .
                            "Roboto=Roboto, sans-serif;" . /* This is regular Roboto font */
                            "Symbol=symbol;" .
                            "Tahoma=tahoma,arial,helvetica,sans-serif;" .
                            "Terminal=terminal,monaco;" .
                            "Times New Roman=times new roman,times;" .
                            "Trebuchet MS=trebuchet ms,geneva;" .
                            "Verdana=verdana,geneva;" .
                            "Webdings=webdings;" .
                            "Wingdings=wingdings,zapf dingbats";
    $init['font_formats'] = $theme_advanced_fonts;
    return $init;
}