第一步:ripro或子主题\parts\entry-footer.php 加入以下代码
搜索这行代码
[cc lang=”php”]
独家
‘;
}
elseif (($ymetaValue==”tuijian”))
{
echo ‘
‘;
}
elseif (($ymetaValue==”jingpin”))
{
echo ‘
‘;
}
elseif (($ymetaValue==”zuixin”))
{
echo ‘
‘;
}
elseif (($ymetaValue==”yiceshi”))
{
echo ‘
‘;
}
?>
[/cc]
第二:ripro或子主题\assets\css\diy.css 加入一下代码
[cc lang=”php”]
/*资源标签*/
.xinghai-tab-dj {
/* margin-left: 8px;*/
position: relative;
display: inline-block;
padding: 1px 6px;
text-align: center;
background-color: #fd721f;
color: #fff;
border-radius: 2px;
line-height: initial;
}
.xinghai-tab-tj {
/* margin-left: 8px;*/
position: relative;
display: inline-block;
padding: 1px 6px;
text-align: center;
background-color: #2196F3;
color: #fff;
border-radius: 2px;
line-height: initial;
}
.xinghai-tab-jp {
/* margin-left: 8px;*/
position: relative;
display: inline-block;
padding: 1px 6px;
text-align: center;
background-color: #ff0000;
color: #fff;
border-radius: 2px;
line-height: initial;
}
.xinghai-tab-zx {
/* margin-left: 8px;*/
position: relative;
display: inline-block;
padding: 1px 6px;
text-align: center;
background-color: #11e666;
color: #fff;
border-radius: 2px;
line-height: initial;
}
.xinghai-tab-ycs {
/* margin-left: 8px;*/
position: relative;
display: inline-block;
padding: 1px 6px;
text-align: center;
background-color: #5342e4;
color: #fff;
border-radius: 2px;
line-height: initial;
}
/*资源标签*/
[/cc]
第三部:ripro或子主题\inc\codestar-framework\options\metabox.theme.php 加入一下代码
[cc lang=”php”]
// 增加文章标题前独家测试等标签
array(
‘id’ => ‘post_style_art’,
‘type’ => ‘radio’,
‘title’ => ‘文章角标’,
‘inline’ => true,
‘options’ => array(
‘dujia’ => ‘独家’,
‘tuijian’ => ‘推荐’,
‘jingpin’ => ‘精品’,
‘zuixin’ => ‘最新’,
‘yiceshi’ => ‘已测试’,
),
‘desc’ => ‘文章标题前显示独家测试等角标’,
),
[/cc]
评论(0)