<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>我本善良 &#187; WEB前端</title>
	<atom:link href="https://wbsl.org/category/web/feed" rel="self" type="application/rss+xml" />
	<link>https://wbsl.org</link>
	<description>一个不太正常的正常人</description>
	<lastBuildDate>Fri, 05 Jul 2024 01:35:05 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.2</generator>
	<item>
		<title>WordPress站点Gravatar头像前后台不显示的解决办法</title>
		<link>https://wbsl.org/web/368.html</link>
		<comments>https://wbsl.org/web/368.html#comments</comments>
		<pubDate>Sat, 25 Feb 2023 05:10:25 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[WEB前端]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">https://wbsl.org/?p=368</guid>
		<description><![CDATA[将以下代码添加到当前主题的functions.php文件中即可： add_filter('get_avatar<a href="https://wbsl.org/web/368.html" class="read-more">Continue Reading</a>]]></description>
				<content:encoded><![CDATA[<p>将以下代码添加到当前主题的functions.php文件中即可：</p>
<p><code>add_filter('get_avatar', function ($avatar) {<br />
return str_replace([<br />
'www.gravatar.com/avatar/',<br />
'0.gravatar.com/avatar/',<br />
'1.gravatar.com/avatar/',<br />
'2.gravatar.com/avatar/',<br />
'secure.gravatar.com/avatar/',<br />
'cn.gravatar.com/avatar/'<br />
], 'cravatar.cn/avatar/', $avatar);<br />
});</code></p>
]]></content:encoded>
			<wfw:commentRss>https://wbsl.org/web/368.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>隐藏溢出和内容溢出元素框时自动出现滚动条</title>
		<link>https://wbsl.org/web/266.html</link>
		<comments>https://wbsl.org/web/266.html#comments</comments>
		<pubDate>Sat, 18 Jan 2020 05:01:42 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[WEB前端]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[溢出]]></category>

		<guid isPermaLink="false">https://wbsl.org/?p=266</guid>
		<description><![CDATA[overflow: hidden; //隐藏溢出 overflow-y: auto; //内容溢出元素框时自动<a href="https://wbsl.org/web/266.html" class="read-more">Continue Reading</a>]]></description>
				<content:encoded><![CDATA[<p>overflow: hidden; //隐藏溢出<br />
overflow-y: auto; //内容溢出元素框时自动出现滚动条，滑动滚动条显示溢出的内容。</p>
]]></content:encoded>
			<wfw:commentRss>https://wbsl.org/web/266.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>whmcs菜单判断登录</title>
		<link>https://wbsl.org/web/258.html</link>
		<comments>https://wbsl.org/web/258.html#comments</comments>
		<pubDate>Wed, 15 Jan 2020 08:41:25 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[WEB前端]]></category>
		<category><![CDATA[whmcs]]></category>
		<category><![CDATA[whmcs登录判断]]></category>

		<guid isPermaLink="false">https://wbsl.org/?p=258</guid>
		<description><![CDATA[{if $loggedin}{else} 中间是登录代码 {/if}]]></description>
				<content:encoded><![CDATA[<p>{if $loggedin}{else}<br />
中间是登录代码<br />
{/if}</p>
]]></content:encoded>
			<wfw:commentRss>https://wbsl.org/web/258.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wordpress主题添加阿里巴巴矢量图字体图标</title>
		<link>https://wbsl.org/web/174.html</link>
		<comments>https://wbsl.org/web/174.html#comments</comments>
		<pubDate>Fri, 31 May 2019 05:11:08 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[WEB前端]]></category>
		<category><![CDATA[wordpress字体图标]]></category>
		<category><![CDATA[字体图标]]></category>
		<category><![CDATA[阿里巴巴矢量图标]]></category>

		<guid isPermaLink="false">https://wbsl.org/?p=174</guid>
		<description><![CDATA[第一步：拷贝项目下面生成的CSS代码加入到主题CSS代码里 [crayon-69dabcd2663293816<a href="https://wbsl.org/web/174.html" class="read-more">Continue Reading</a>]]></description>
				<content:encoded><![CDATA[<p>第一步：拷贝项目下面生成的CSS代码加入到主题CSS代码里</p>
<p></p><pre class="crayon-plain-tag">@font-face {
  font-family: 'iconfont';
  src: url('fonts/iconfont.eot');
  src: url('fonts/iconfont.eot?#iefix') format('embedded-opentype'),
      url('fonts/iconfont.woff2') format('woff2'),
      url('fonts/iconfont.woff') format('woff'),
      url('fonts/iconfont.ttf') format('truetype'),
      url('fonts/iconfont.svg#iconfont') format('svg');
}

.iconfont {
  font-family: "iconfont" !important;
  font-size: 16px;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}</pre><p> </p>
<p>第二步：上传字体到网站目录，这里我是新建了一个字体目录fonts，所以在字体路径的地方要注意修改路径一致。</p>
<p>第三步：打开演示页面，挑选相应图标并获取字体编码，应用于页面要显示的位置（效果参阅本主题导航菜单）</p>
<p></p><pre class="crayon-plain-tag">&lt;span class="iconfont"&gt;&amp;#x33;&lt;/span&gt;</pre><p> </p>
]]></content:encoded>
			<wfw:commentRss>https://wbsl.org/web/174.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS3 overflow-y 属性</title>
		<link>https://wbsl.org/web/171.html</link>
		<comments>https://wbsl.org/web/171.html#comments</comments>
		<pubDate>Thu, 30 May 2019 06:00:56 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[WEB前端]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[overflow-y]]></category>
		<category><![CDATA[溢出]]></category>

		<guid isPermaLink="false">https://wbsl.org/?p=171</guid>
		<description><![CDATA[语法 [crayon-69dabcd267c0c500661406/] visible 不裁剪内容，可能会显示<a href="https://wbsl.org/web/171.html" class="read-more">Continue Reading</a>]]></description>
				<content:encoded><![CDATA[<p>语法</p>
<p></p><pre class="crayon-plain-tag">overflow-y: visible|hidden|scroll|auto|no-display|no-content;</pre><p> </p>
<p>visible	不裁剪内容，可能会显示在内容框之外。<br />
hidden	裁剪内容 - 不提供滚动机制。<br />
scroll	裁剪内容 - 提供滚动机制。<br />
auto	如果溢出框，则应该提供滚动机制。<br />
no-display	如果内容不适合内容框，则删除整个框。<br />
no-content	如果内容不适合内容框，则隐藏整个内容。</p>
]]></content:encoded>
			<wfw:commentRss>https://wbsl.org/web/171.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>lnmp安装WordPress伪静态解决方案</title>
		<link>https://wbsl.org/web/166.html</link>
		<comments>https://wbsl.org/web/166.html#comments</comments>
		<pubDate>Sat, 11 May 2019 06:16:18 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[WEB前端]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[WordPress伪静态]]></category>
		<category><![CDATA[伪静态]]></category>

		<guid isPermaLink="false">https://wbsl.org/?p=166</guid>
		<description><![CDATA[首先，默认安装的lnmp环境中已经有伪静态文件wordpress.conf文件在"/usr/local/ngi<a href="https://wbsl.org/web/166.html" class="read-more">Continue Reading</a>]]></description>
				<content:encoded><![CDATA[<p>首先，默认安装的lnmp环境中已经有伪静态文件wordpress.conf文件在"/usr/local/nginx/conf/wordpress.conf"中，我们可以核对一下里面的编译代码是不是为：</p>
<p></p><pre class="crayon-plain-tag">if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}</pre><p> </p>
<p>如果不是，我们需要修改成上面的代码文件:</p>
<p>vim /usr/local/nginx/conf/wordpress.conf</p>
<p>复制上面的代码粘贴进去然后保存退出。</p>
<p>其次，我们需要在属于我们网站的配置文件：</p>
<p>/usr/local/nginx/conf/vhost/wbsl.org.conf(自己添加域名自动命名)</p>
<p>我们会看到类似下面的代码，看到include wordpress.conf;部分是我添加进去的，添加后保存。</p>
<p></p><pre class="crayon-plain-tag">server {
listen 80;
server_name www.wbsl.org;
index index.html index.php;
include wordpress.conf;</pre><p> </p>
<p>最后，我们用ssh登录VPS，然后用下面的命令重启lnmp就可以了。</p>
<p>/root/lnmp restart</p>
]]></content:encoded>
			<wfw:commentRss>https://wbsl.org/web/166.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>lnmp开启scandir函数，解决当面付插件报错问题</title>
		<link>https://wbsl.org/web/161.html</link>
		<comments>https://wbsl.org/web/161.html#comments</comments>
		<pubDate>Sun, 05 May 2019 07:38:01 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[WEB前端]]></category>
		<category><![CDATA[whmcs]]></category>
		<category><![CDATA[当面付]]></category>
		<category><![CDATA[报错scandir函数]]></category>

		<guid isPermaLink="false">https://wbsl.org/?p=161</guid>
		<description><![CDATA[lnmp默认禁止了scandir函数，如果你在lnmp上安装了whmcs的当面付插件，那么在付款的时候就提示F<a href="https://wbsl.org/web/161.html" class="read-more">Continue Reading</a>]]></description>
				<content:encoded><![CDATA[<p>lnmp默认禁止了scandir函数，如果你在lnmp上安装了whmcs的当面付插件，那么在付款的时候就提示Fatal Error:管理员未开启scandir PHP函数 支付宝Sdk 需要使用该函数 请修改php.ini。</p>
<p>说一下解决方法,很简单，在php.ini中把scandir函数从禁用列表里删除即可。</p>
<p>vi /usr/local/php/etc/php.ini<br />
然后搜索scandir，将其删除，然后退出保存，重启lnmp就可以了。</p>
]]></content:encoded>
			<wfw:commentRss>https://wbsl.org/web/161.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>免插件实现WordPress文章阅读次数</title>
		<link>https://wbsl.org/web/122.html</link>
		<comments>https://wbsl.org/web/122.html#comments</comments>
		<pubDate>Thu, 25 Apr 2019 07:50:26 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[WEB前端]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[阅读次数统计]]></category>

		<guid isPermaLink="false">https://wbsl.org/?p=122</guid>
		<description><![CDATA[我这个主题默认没有阅读次数统计，所以就自己加了一个，方便也比较简单。我这个是没有插件的，个人觉得插件用的越少越<a href="https://wbsl.org/web/122.html" class="read-more">Continue Reading</a>]]></description>
				<content:encoded><![CDATA[<p>我这个主题默认没有阅读次数统计，所以就自己加了一个，方便也比较简单。我这个是没有插件的，个人觉得插件用的越少越好，不得已的情况下再用插件比较好。</p>
<p>第一步、将下面代码加到主题functions模版文件中：</p><pre class="crayon-plain-tag">//postviews   
function get_post_views ($post_id) {   
  
    $count_key = 'views';   
    $count = get_post_meta($post_id, $count_key, true);   
  
    if ($count == '') {   
        delete_post_meta($post_id, $count_key);   
        add_post_meta($post_id, $count_key, '0');   
        $count = '0';   
    }   
  
    echo number_format_i18n($count);   
  
}   
  
function set_post_views () {   
  
    global $post;   
  
    $post_id = $post -&gt; ID;   
    $count_key = 'views';   
    $count = get_post_meta($post_id, $count_key, true);   
  
    if (is_single() || is_page()) {   
  
        if ($count == '') {   
            delete_post_meta($post_id, $count_key);   
            add_post_meta($post_id, $count_key, '0');   
        } else {   
            update_post_meta($post_id, $count_key, $count + 1);   
        }   
  
    }   
  
}   
add_action('get_header', 'set_post_views');</pre><p>第二步、将调用显示阅读次数代码加到single模版适当的位置：</p><pre class="crayon-plain-tag">&lt;?php get_post_views($post -&gt; ID); ?&gt; views</pre><p></p>
]]></content:encoded>
			<wfw:commentRss>https://wbsl.org/web/122.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
