Garfunkel 中文版 WordPress 主题自助升级方法与说明

Garfunkel 中文版 WordPress 主题自助升级方法与说明


正在查看 2 个帖子:1-2 (共 2 个帖子)
  • 作者
    帖子
  • 诗语
    管理员
    • 文章数量: 5,866
    @feibisi
    楼主

    themes-update

    Garfunkel 中文版 WordPress 主题自助升级方法与说明

    Garfunkel | 中文版、汉化版 收藏家 博客 简约 响应式 两栏 WordPress 主题

    Garfunkel 中文版  是一款瀑布流 博客主题,这里提供一下自助升级主题的方法,一方面帮助用户及时更新,另一方面是减轻我们后续维护更新频率和工作量。

    通常 WordPress 主题、插件有更新的话,后台会出现升级提示,您直接升级后可能会出现网站无法访问的情况,请根据以下方式进行修改;

    如果您不会修改代码,那么请耐心等等薇晓朵官方的中文版升级,通常我们会在接收到更新提示的一周内提供版本更新。

    WordPress 主题修改的通用方法:

    进入后台——外观——主题——编辑——然后选择——模板函数 (functions.php)

    使用Windows下使用Control+F 、Mac下使用 Command+F 查找 google 或 fonts.googleapis.com ;

    此主题有两行代码,均为 Google 字体,如果您使用的是我们的中文版主题,那么Google字体是多余的,而且还会拖慢网站速度,请将其替换为 “#” 。

    修改后的代码如下:

    // Enqueue styles
    function garfunkel_load_style() {
    if ( !is_admin() ) {
    wp_register_style('garfunkel_googleFonts', '//#' );   //改这里,或搜索前面的代码
    wp_register_style('garfunkel_genericons', get_template_directory_uri() . '/genericons/genericons.css' );
    wp_register_style('garfunkel_style', get_stylesheet_uri() );
    
    wp_enqueue_style( 'garfunkel_googleFonts' );
    wp_enqueue_style( 'garfunkel_genericons' );
    wp_enqueue_style( 'garfunkel_style' );
    }
    }
    
    add_action('wp_print_styles', 'garfunkel_load_style');
    
    // Add editor styles
    function garfunkel_add_editor_styles() {
    add_editor_style( 'garfunkel-editor-style.css' );
    $font_url = '//#';   //改这里,或搜索前面的代码
    add_editor_style( str_replace( ',', '%2C', $font_url ) );
    }
    add_action( 'init', 'garfunkel_add_editor_styles' );

    我们的中文版主题已经针对中文用户做了优化,所以不建议使用其他字体 CDN 源进行替换,这样反而会拖慢网站的加载速度。

    诗语
    管理员
    • 文章数量: 5,866
    @feibisi
    楼主

    找到,Garfunkel主题中的: flickr-widget.php (widgets/flickr-widget.php)

    
    <div class="flickr-container">
    
    <script src="https://www.flickr.com/badge_code_v2.gne?count=<?php echo $fli_number; ?>&display=latest&size=s&layout=x&source=user&user=<?php echo $fli_id; ?>" type="text/javascript"></script>
    </div>

    <script src="https://www.flickr.com/badge_code_v2.gne?count=<?php echo $fli_number; ?>&display=latest&size=s&layout=x&source=user&user=<?php echo $fli_id; ?>" type="text/javascript"></script>

    删除或用 “#” 代替.

正在查看 2 个帖子:1-2 (共 2 个帖子)
  • 话题「Garfunkel 中文版 WordPress 主题自助升级方法与说明」已关闭,不接受新回复。

未找到对应子版块?请直接在 [疑难杂症] 版块中发帖提问。

收藏纪念品


有奖活动

参与论坛社区问答,有机会获赠文派瓦普(Wapuu.com)手办模型。

话题信息

商业系统