阅读本文大约需要:4 分钟

1./ripro-chlid/parts/template-parts/content-grid.php首先我们进入文件找到第20行

   <?php 
    $ymetaValue = get_post_meta(get_the_ID(), "post_style_art", true);
    if (($ymetaValue=="yuanc") && _cao('site_vyuan',true))
    {
    echo '<div class="free-theme-tag">独家</div>';
    }
    elseif (($ymetaValue=="tuijian") && _cao('site_vtui',true))
    {
    echo '<div class="free-theme-tag">推荐</div>';	
    }
    elseif (($ymetaValue=="zhuanz") && _cao('site_ztui',true))
    {
    echo '<div class="free-theme-tag">转载</div>';	
    }
    elseif (($ymetaValue=="jinhua") && _cao('site_jtui',true))
    {
    echo '<div class="free-theme-tag">精华</div>';	
    }
    elseif (($ymetaValue=="yiceshi") && _cao('site_ytui',true))
    {
    echo '<div class="free-theme-tag">已测试</div>';	
    }
     elseif (($ymetaValue=="okmg-tag") && _cao('site_okmg',true))
    {
    echo '<div class="free-theme-tag">芒果版</div>';	
    }
    elseif (($ymetaValue=="okmg-svipp") && _cao('site_okmg-svipp',true))
    {
    echo '<div class="free-theme-tag">会员专享</div>';	
    }
    elseif (($ymetaValue=="okmg-shangye") && _cao('site_okmg-svipp',true))
    {
    echo '<div class="free-theme-tag">商业专享</div>';	
    }
     elseif (($ymetaValue=="okmg-bgx") && _cao('site_okmg-gx',true))
    {
    echo '<div class="free-theme-tag">包更新</div>';	
    }
    ?>

进入/ripro-chid/inc/Options/child_theme.php文件找到471行

)); 
//首页功能    
CSF::createSection($prefix, array(
    'parent' => 'jhshome_fields',
    'title'  => '首页功能',
    'icon'   => 'fa fa-tachometer',
    'description' => '承蒙您喜欢本二开美化包, 由计划书之家开发JHripro_child主题',
    'fields' => array(        
        
        array(
            'id'         => 'site_vclock',
            'type'       => 'switcher',
            'title'      => '首页收费资源锁',
            'help'      => '开启不显示锁图标,关闭则显示',
            'default'    => true,
        ),
        //首页VIP角标 
        array(
            'id'         => 'site_vwip',
            'type'       => 'switcher',
            'title'      => '首页左上VIP角标',
            'help'      => '开启后可显示角标',
            'default'    => true,
        ),
        array(
            'id'         => 'site_vyuan',
            'type'       => 'switcher',
            'title'      => '首页右下角独家角标',
            'help'      => '开启后可显示角标',
            'default'    => true,
        ),
        array(
            'id'         => 'site_vtui',
            'type'       => 'switcher',
            'title'      => '首页右下角推荐角标',
            'help'      => '开启后可显示角标',
            'default'    => false,
        ),
        array(
            'id'         => 'site_ztui',
            'type'       => 'switcher',
            'title'      => '首页右下角转载角标',
            'help'      => '开启后可显示角标',
            'default'    => false,
        ),
        array(
            'id'         => 'site_jtui',
            'type'       => 'switcher',
            'title'      => '首页右下角精品角标',
            'help'      => '开启后可显示角标',
            'default'    => false,
        ),
        array(
            'id'         => 'site_ytui',
            'type'       => 'switcher',
            'title'      => '首页右下角已测试角标',
            'help'      => '开启后可显示角标',
            'default'    => false,
        ),
               array(
            'id'         => 'site_okmg',
            'type'       => 'switcher',
            'title'      => '首页右下角芒果版角标',
            'help'      => '开启后可显示角标',
            'default'    => false,
        ),
               array(
            'id'         => 'site_okmg-svipp',
            'type'       => 'switcher',
            'title'      => '首页右下角SVIP专享角标',
            'help'      => '开启后可显示角标',
            'default'    => false,
        ),
            array(
            'id'         => 'site_okmg-svipp',
            'type'       => 'switcher',
            'title'      => '首页右下角商业专享角标',
            'help'      => '开启后可显示角标',
            'default'    => false,
        ),
         array(
            'id'         => 'site_okmg-gx',
            'type'       => 'switcher',
            'title'      => '首页右下角包更新角标',
            'help'      => '开启后可显示角标',
            'default'    => false,
        ),
        //搜索样式
         array(
            'id'         => 'home_search',
            'type'       => 'switcher',
            'title'      => '首页搜索条(原主题5.7感觉不美好/小框搜索条)',
            'help'      => '开启为全屏样式(具体设置在原主题设置)',
            'default'    => false,
        ),
      ),
    ));

进入/ripro-chid/inc/Options/art_theme.php找到67行

CSF::createSection($prefix_post_opts, array(
        'fields' => array(
        //jhshome.top 增加文章标题前功能
            array(
                'id'      => 'post_style_art',
                'type'    => 'radio',
                'title'   => '文章类型',
                'inline'  => true,
                'options' => array(
                    'yuanc'  => '独家',
                    'zhuanz' => '转载',
                    'jinhua' => '精品',
                    'tuijian' => '推荐',
                    'yiceshi' => '已测试',
                     'okmg-tag' => '芒果版',
                       'okmg-svipp' => 'VIP专享',
                         'okmg-shangye' => '商业专享',
                          'okmg-bgx' => '包更新',
                    
                ),
                'desc'    => '选择类型,或展示在首页,文章页,不需要则不用选择',
            ),
        ),
    ));
}

打开根目录的single.php文件找到80行

<div class="content-box">
    <hgroup class="article-info">
    	<!--原创-->
    	<?php 
    $ymetaValue = get_post_meta(get_the_ID(), "post_style_art", true);
    if (($ymetaValue=="yuanc") && _cao('site_wvyuan',true))
    {
    echo '<div class="free-theme-wtag">独家</div>';
    }
    elseif (($ymetaValue=="tuijian") && _cao('site_wvtui',true))
    {
    echo '<div class="free-theme-wtag">推荐</div>';	
    }
    elseif (($ymetaValue=="zhuanz") && _cao('site_wztui',true))
    {
    echo '<div class="free-theme-wtag">转载</div>';	
    }
    elseif (($ymetaValue=="jinhua") && _cao('site_wjtui',true))
    {

css文件在div.css 55行

部分内容回复可见

转载请注明来源:ripro子主题右下角添加图标