1、修改:
ripro-v2\ripro-v2\inc\options\taxonomy-options.php
将注释去掉。如下:


2、后台分类中将自定义栏目缩略图开关打开
3、打开/wp-content/themes/ripro-v2/inc/template-tags.php
搜索:
根据模式输出缩略图img 延迟加载html标签
将下边代码:

if (!function_exists('_get_post_media')) {
    function _get_post_media($post = null, $size = 'thumbnail',$video = true) {
        if (empty($post)) {
            global $post;
        }elseif (is_numeric($post)) {
            $post = get_post($post);
        }

        $_size_px = _get_post_thumbnail_size();

        $src = _get_post_thumbnail_url($post, $size);

替换成:

if (!function_exists('_get_post_media')) {
    function _get_post_media($post = null, $size = 'thumbnail',$video = true) {
        if (empty($post)) {
            global $post;
        }
        $category = get_the_category($post->ID);
        $catid = $category[0]->term_id;
        if (get_term_meta($catid, 'is_thumb_px', true)) {
            $_size_px = get_term_meta($catid, 'thumb_px', true); //缩略图高度
        }else{
            $_size_px = _get_post_thumbnail_size();
        }

        $src = _get_post_thumbnail_url($post, $size);
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。