下面开始为:RiPro 主题美化教程添加资源VIP角标—免费教程
添加资源VIP角标
第一步:主题目录 -> inc ->theme-functions.php ,搜索“// 获取图片高度”,在“< div class=”entry-media”>”后添加如下代码
1
2
3
4
5
6
7 </pre>
<pre class="line-numbers language-php"><code class=" language-php"><span class="token php language-php"><span class="token delimiter important"><?php</span> <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token function">_get_post_shop_hide</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token operator">||</span><span class="token punctuation">(</span><span class="token function">_get_post_price</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">!=</span><span class="token number">0</span><span class="token punctuation">)</span><span class="token operator">&&</span> <span class="token function">_cao</span><span class="token punctuation">(</span>‘grid_is_price’<span class="token punctuation">,</span><span class="token boolean constant">true</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
<span class="token keyword">echo</span> ‘<span class="token operator"><</span>i <span class="token keyword">class</span><span class="token operator">=</span>”vwip30″<span class="token operator">></span><span class="token operator"><</span><span class="token operator">/</span>i<span class="token operator">></span>’<span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token keyword">else</span><span class="token punctuation">{</span>
<span class="token keyword">echo</span> ‘<span class="token operator"><</span>i <span class="token keyword">class</span><span class="token operator">=</span>”vwip10″<span class="token operator">></span><span class="token operator"><</span><span class="token operator">/</span>i<span class="token operator">></span>’<span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token delimiter important">?></span></span></code></pre>
<pre class="line-numbers language-php">
第二步:主题目录 -> assets -> css -> diy.css 添加如下样式
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 </pre>
<pre class="line-numbers language-css"><code class=" language-css"><span class="token selector">.vwip30</span> <span class="token punctuation">{</span>
<span class="token property">background–position</span><span class="token punctuation">:</span> –40px 0
<span class="token punctuation">}</span>
<span class="token selector">.vwip10,.vwip30</span> <span class="token punctuation">{</span>
<span class="token property">position</span><span class="token punctuation">:</span> absolute<span class="token punctuation">;</span>
<span class="token property">z–index</span><span class="token punctuation">:</span> 10<span class="token punctuation">;</span>
<span class="token property">border–radius</span><span class="token punctuation">:</span> 5px 0 0 0
<span class="token punctuation">}</span>
<span class="token selector">.vwip10,.vwip30</span><span class="token punctuation">{</span>
<span class="token property">display</span><span class="token punctuation">:</span> inline–block<span class="token punctuation">;</span>
<span class="token property">background–image</span><span class="token punctuation">:</span> <span class="token url"><span class="token function">url</span><span class="token punctuation">(</span>../images/xxx.png<span class="token punctuation">)</span></span><span class="token punctuation">;</span>
<span class="token property">background–size</span><span class="token punctuation">:</span> auto 40px<span class="token punctuation">;</span>
<span class="token property">vertical–align</span><span class="token punctuation">:</span> middle<span class="token punctuation">;</span>
<span class="token property">height</span><span class="token punctuation">:</span> 40px<span class="token punctuation">;</span>
<span class="token property">width</span><span class="token punctuation">:</span> 40px<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token selector">.vvip10,.vwip10</span> <span class="token punctuation">{</span>
<span class="token property">background–position</span><span class="token punctuation">:</span> 0 0</code></pre>
<pre class="line-numbers language-php">
这张图你另存为后名字可能会和我的不一样,自己改掉就好,xxx.png,改成你自己图片的名称。
第三步:主题目录 -> assets -> images 放入如下图片
这个角标教程好像无效了或者是小编技术问题反正就是用不了或者就是致命错误!!!!
修改的时候切记先备份!!备份!!!再备份!!!
服务声明: 本网站所有发布的源码、软件和资料均为作者提供或网友推荐收集各大资源网站整理而来,仅供功能验证和学习研究使用,您必须在下载后24小时内删除。不得使用于非法商业用途,不得违反国家法律,否则后果自负!一切关于该资源商业行为与本站无关。如果您喜欢该程序,请支持购买正版源码,得到更好的正版服务。如有侵犯你的版权合法权益,请邮件或QQ:3089659733与我们联系处理删除(邮箱:ynzsy@qq.com),本站将立即更正。
评论(0)